(info: string)
| 204 | } |
| 205 | |
| 206 | function getFenceLanguage(info: string): string { |
| 207 | const trimmed = info.trim(); |
| 208 | if (!trimmed) return ""; |
| 209 | |
| 210 | if (trimmed.startsWith("{")) { |
| 211 | return trimmed.match(/\.([\w+#.-]+)/)?.[1] || ""; |
| 212 | } |
| 213 | return trimmed.split(/\s+/, 1)[0] || ""; |
| 214 | } |
| 215 | |
| 216 | function collectMarkdownLanguages(markdown: string, result: Set<string>): void { |
| 217 | const fencePattern = /^ {0,3}(?:`{3,}|~{3,})[ \t]*([^\n]*)$/gm; |
no outgoing calls
no test coverage detected