We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1424277 commit c25bc62Copy full SHA for c25bc62
src/commands/show.ts
@@ -51,7 +51,7 @@ export async function showSolution(node?: LeetCodeNode): Promise<void> {
51
try {
52
let solution: string = await leetCodeExecutor.showSolution(node, language);
53
// tslint:disable-next-line: no-eval
54
- solution = eval(`"${solution.replace(/\n/g, "\\n")}"`); // decode solution string with escaped characters
+ solution = eval(`"${solution.replace(/\n/g, "\\n").replace(/"/g, '\\"')}"`); // decode solution string with escaped characters
55
await leetCodeSolutionProvider.show(solution, node);
56
} catch (error) {
57
leetCodeChannel.appendLine(error.toString());
0 commit comments