mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Add codeql comments and small fix (#185931)
This commit is contained in:
@@ -103,7 +103,7 @@ class JsDocCompletionProvider implements vscode.CompletionItemProvider {
|
||||
export function templateToSnippet(template: string): vscode.SnippetString {
|
||||
// TODO: use append placeholder
|
||||
let snippetIndex = 1;
|
||||
template = template.replace(/\$/g, '\\$');
|
||||
template = template.replace(/\$/g, '\\$'); // CodeQL [SM02383] This is only used for text which is put into the editor. It is not for rendered html
|
||||
template = template.replace(/^[ \t]*(?=(\/|[ ]\*))/gm, '');
|
||||
template = template.replace(/^(\/\*\*\s*\*[ ]*)$/m, (x) => x + `\$0`);
|
||||
template = template.replace(/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]*$/gm, (_param, type, post) => {
|
||||
|
||||
@@ -217,7 +217,7 @@ function convertLinkTags(
|
||||
}
|
||||
|
||||
function escapeMarkdownSyntaxTokensForCode(text: string): string {
|
||||
return text.replace(/`/g, '\\$&');
|
||||
return text.replace(/`/g, '\\$&'); // CodeQL [SM02383] This is only meant to escape backticks. The Markdown is fully sanitized after being rendered.
|
||||
}
|
||||
|
||||
export function tagsToMarkdown(
|
||||
|
||||
Reference in New Issue
Block a user