diff --git a/commands/predict.js b/commands/predict.js index b230dd4..5ee92d9 100644 --- a/commands/predict.js +++ b/commands/predict.js @@ -80,7 +80,8 @@ module.exports = async function () { vscode.workspace.openTextDocument({ language: languageId }).then((doc) => { vscode.window.showTextDocument(doc, vscode.ViewColumn.Beside, true).then((editor) => { editor.edit((editBuilder) => { - editBuilder.insert(new vscode.Position(0, 0), answer.content); + const escapedContent = answer.content.replace(/\$/g, "\$"); + editBuilder.insert(new vscode.Position(0, 0), escapedContent); }); }); });