Skip to content

Commit

Permalink
Remove redundant import
Browse files Browse the repository at this point in the history
  • Loading branch information
ianabrown committed Nov 27, 2024
1 parent 6f9ac75 commit f80c567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pgnViewerEditor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as vscode from 'vscode';
import * as fs from 'fs';

export class PgnViewerEditorProvider implements vscode.CustomTextEditorProvider {
public static register(context: vscode.ExtensionContext): vscode.Disposable {
Expand All @@ -26,11 +25,12 @@ export class PgnViewerEditorProvider implements vscode.CustomTextEditorProvider
webviewPanel.webview.html = this.getHtmlForWebview(webviewPanel.webview);

const updateWebview = () => {
// The pgn-viewer parser has a problem with backslashes in the text fields
// The pgn-viewer parser seems to have a problem with backslashes in the text fields
// It is a bit extreme of us to just replace them, but the alternative is a failed load.
// This probably isn't a common problem, but happened to occur in a sample file
// of Bishop's Opening games used for testing.
const text = document.getText().replaceAll("\\", "/");

webviewPanel.webview.postMessage({
type: 'update',
content: text
Expand Down

0 comments on commit f80c567

Please sign in to comment.