MCPcopy
hub / github.com/microsoft/vscode / add

Function add

extensions/copilot/src/util/common/markdown.ts:30–35  ·  view source on GitHub ↗
(lineComment: { start: string; end?: string })

Source from the content-addressed store, hash-verified

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('|')})`;

Callers 3

createFilepathRegexpFunction · 0.70
enterNewScopeFunction · 0.50
bindElementFunction · 0.50

Calls 2

escapeRegExpCharactersFunction · 0.90
pushMethod · 0.65

Tested by

no test coverage detected