(header: string)
| 6 | * Determines if a code block header indicates markdown content |
| 7 | */ |
| 8 | export 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. |
no test coverage detected