Skip to content

Commit

Permalink
fix: use fspath to get correct path [IDE-398] (#469)
Browse files Browse the repository at this point in the history
* fix: use fspath to get correct path

* chore: update changelog
  • Loading branch information
ShawkyZ authored Jun 11, 2024
1 parent 3cfd254 commit 7d7e3c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Snyk Security Changelog

## [2.12.1]
- Fix Code Suggestion rendering issue on Windows.

## [2.12.0]
- Renders the AI Fix panel and adds more custom styling for VSCode.
- Adds position line interaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class CodeSuggestionWebviewProvider
'suggestion',
'suggestionLS.css',
);
const ideStyle = readFileSync(ideStylePath.path, 'utf8');
const ideStyle = readFileSync(ideStylePath.fsPath, 'utf8');
const ideScriptPath = vscode.Uri.joinPath(
vscode.Uri.file(this.context.extensionPath),
'out',
Expand All @@ -137,7 +137,7 @@ export class CodeSuggestionWebviewProvider
'suggestion',
'codeSuggestionWebviewScriptLS.js',
);
const ideScript = readFileSync(ideScriptPath.path, 'utf8');
const ideScript = readFileSync(ideScriptPath.fsPath, 'utf8');
html = html.replace('${ideStyle}', '<style nonce=${nonce}>' + ideStyle + '</style>');
html = html.replace('${ideScript}', '<script nonce=${nonce}>' + ideScript + '</script>');
const nonce = getNonce();
Expand Down

0 comments on commit 7d7e3c0

Please sign in to comment.