Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
12345678910111213141516171819202122232425import { isMarkdownFile } from "$lib/markup/format";import type { MarkupContext } from "$lib/markup/paths";
export const renderDocument = async ( filename: string, contents: string, ctx: MarkupContext): Promise<string | null> => { if (!isMarkdownFile(filename)) return null; const { SOURCE_LIMIT, renderMarkdown } = await import("./markdown"); if (contents.length > SOURCE_LIMIT) return null; return renderMarkdown(contents, ctx);};
// like renderDocument, but for content that is always markdown (issue and// comment bodies) rather than a repo file with an extension to sniffexport const renderMarkup = async ( contents: string, ctx: MarkupContext): Promise<string | null> => { const { SOURCE_LIMIT, renderMarkdown } = await import("./markdown"); if (contents.length > SOURCE_LIMIT) return null; return renderMarkdown(contents, ctx);};