Skip to content

Commit 91223fc

Browse files
eoinkellymauro-oto
authored andcommitted
Correctly recognise "Syntax OK" message from dead_end
Current latest dead_end (v4.0.0) appends a newline to the "Syntax OK" message. Presumably this was not the case with older versions which is why this extension was not expecting the newline. This change updates this extension to not care about the newline.
1 parent eea353d commit 91223fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extension.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ function activate(context) {
1919
deadEndOutput = stderr;
2020
}
2121

22+
const syntaxOkOutputRegex = /Syntax OK\s*/;
2223
console.log(deadEndOutput);
23-
if (deadEndOutput == "Syntax OK") return;
24+
25+
if (syntaxOkOutputRegex.test(deadEndOutput)) return;
2426

2527
const lineRegex = /\s+(\d+)(.*)/g;
2628
const allLines = [];

0 commit comments

Comments
 (0)