(lineComment: { start: string; end?: string })
| 28 | const prefixes: string[] = ['#', '\\/\\/']; // always allow # and // as comment start |
| 29 | const suffixes: string[] = []; |
| 30 | function add(lineComment: { start: string; end?: string }) { |
| 31 | prefixes.push(escapeRegExpCharacters(lineComment.start)); |
| 32 | if (lineComment.end) { |
| 33 | suffixes.push(escapeRegExpCharacters(lineComment.end)); |
| 34 | } |
| 35 | } |
| 36 | add(language.lineComment); |
| 37 | language.alternativeLineComments?.forEach(add); |
| 38 | const startMatch = `(?:${prefixes.join('|')})`; |
no test coverage detected