(markdown: string, result: Set<string>)
| 214 | } |
| 215 | |
| 216 | function collectMarkdownLanguages(markdown: string, result: Set<string>): void { |
| 217 | const fencePattern = /^ {0,3}(?:`{3,}|~{3,})[ \t]*([^\n]*)$/gm; |
| 218 | for ( |
| 219 | let match = fencePattern.exec(markdown); |
| 220 | match; |
| 221 | match = fencePattern.exec(markdown) |
| 222 | ) { |
| 223 | const language = getFenceLanguage(match[1] || ""); |
| 224 | if (language) result.add(language); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | function collectHoverLanguages( |
| 229 | contents: Hover["contents"], |
no test coverage detected