From 81d6d605292a649177376b476b79cff763fc110e Mon Sep 17 00:00:00 2001 From: mikalai_biazruchka Date: Thu, 24 Apr 2025 13:35:32 +0300 Subject: [PATCH] fix(695): fix escape of $ sign --- commands/predict.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }); }); });