File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
extensions/ql-vscode/src/variant-analysis Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1015,9 +1015,11 @@ async function formatWithMarkdown(
10151015 const backFormatting : string =
10161016 "```\n\n</details>\n\n ### Notes\n - notes placeholder\n\n" ;
10171017
1018- // Format the content with Markdown
1019- // Replace ``` in the content with \``` to avoid breaking the Markdown code block
1020- const formattedContent = `## ${ header } \n\n${ frontFormatting } ${ content . replaceAll ( "```" , "\\```" ) } ${ backFormatting } ` ;
1018+ // Format the content with Markdown:
1019+ // - Replace ``` in the content with \``` to avoid breaking the Markdown code block
1020+ // - Remove raw terminal escape sequences if any (workaround until `--diff-style plain` is handled by autofix)
1021+ // eslint-disable-next-line no-control-regex
1022+ const formattedContent = `## ${ header } \n\n${ frontFormatting } ${ content . replaceAll ( "```" , "\\```" ) . replaceAll ( / \x1b \[ [ 0 - 9 ; ] * m / g, "" ) } ${ backFormatting } ` ;
10211023
10221024 // Write the formatted content back to the file
10231025 await writeFile ( inputFile , formattedContent ) ;
You can’t perform that action at this time.
0 commit comments