Skip to content

Commit

Permalink
fix: do not interprete tags in displayed code snippets (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch authored Nov 24, 2023
1 parent a2c0676 commit b52376b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
30 changes: 21 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
"@types/babel__traverse": "^7.12.2",
"@types/find-package-json": "^1.2.2",
"@types/glob": "^7.1.3",
"@types/he": "^1.2.3",
"@types/lodash": "^4.14.161",
"@types/marked": "^3.0.0",
"@types/mocha": "^8.0.3",
Expand Down Expand Up @@ -441,6 +442,7 @@
"analytics-node": "^4.0.1",
"axios": "^0.27.2",
"glob": "^7.2.0",
"he": "^1.2.0",
"htmlparser2": "^7.2.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import he from 'he';
import _ from 'lodash';
import * as vscode from 'vscode';
import {
Expand Down Expand Up @@ -111,6 +112,14 @@ export class CodeSuggestionWebviewProvider
);
this.registerListeners();
}

issue.additionalData.exampleCommitFixes.map(ecf => {
return ecf.lines.map(l => {
l.line = he.encode(l.line);
return l;
});
});

this.panel.webview.html = this.getHtmlForWebview(this.panel.webview);
this.panel.iconPath = vscode.Uri.joinPath(
vscode.Uri.file(this.context.extensionPath),
Expand Down

0 comments on commit b52376b

Please sign in to comment.