MCPcopy Index your code
hub / github.com/continuedev/continue / headerIsMarkdown

Function headerIsMarkdown

core/utils/markdownUtils.ts:8–22  ·  view source on GitHub ↗
(header: string)

Source from the content-addressed store, hash-verified

6 * Determines if a code block header indicates markdown content
7 */
8export function headerIsMarkdown(header: string): boolean {
9 return (
10 header === "md" ||
11 header === "markdown" ||
12 header === "gfm" ||
13 header === "github-markdown" ||
14 header.includes(" md") ||
15 header.includes(" markdown") ||
16 header.includes(" gfm") ||
17 header.includes(" github-markdown") ||
18 header.split(" ")[0]?.split(".").pop() === "md" ||
19 header.split(" ")[0]?.split(".").pop() === "markdown" ||
20 header.split(" ")[0]?.split(".").pop() === "gfm"
21 );
22}
23
24/**
25 * Determines if a file is a markdown file based on its filepath.

Callers 4

hasNestedMarkdownBlocksFunction · 0.90
patchNestedMarkdownFunction · 0.90
shouldStopAtPositionMethod · 0.85

Calls 1

popMethod · 0.45

Tested by

no test coverage detected