From 51ef8c95367890690179375f979c257d61a1b4e0 Mon Sep 17 00:00:00 2001 From: amitrahman1026 Date: Wed, 8 Nov 2023 23:22:00 -0500 Subject: [PATCH] Detection for multi-line comments, update regex Signed-off-by: amitrahman1026 --- src/builders/cmake.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builders/cmake.ts b/src/builders/cmake.ts index 70fad72..38915ec 100644 --- a/src/builders/cmake.ts +++ b/src/builders/cmake.ts @@ -213,9 +213,9 @@ class CMakeBuilder implements IBuilder { if (reverse) lines = lines.reverse(); // FIXME: this doesn't support file name which contains ':', but captures white space - const re = /CMake Error at \/(?[^:]+):(?\d+)(:(?\d+))?\b/; + const re = /(?:CMake Error at )?(?[^:]+):(?\d+)(:(?\d+))?\b/; for (const line of lines) { - const m = line.match(re); + const m = line.trimStart().match(re); if (m && m.groups) { return new FileLocation( m.groups.file as string,