From 8009900cdff668d0b7f84ebefe2b7f3ab817b779 Mon Sep 17 00:00:00 2001 From: mitermayer Date: Tue, 7 Nov 2017 22:40:16 -0800 Subject: Fixing error matching regex to match new prettier CLI errors - Adapting the CLI error message parsing to handle new prettier error output format --- autoload/prettier.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'autoload') diff --git a/autoload/prettier.vim b/autoload/prettier.vim index d929ff8..d8bbe16 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -190,8 +190,10 @@ function! s:Handle_Parsing_Errors(out) abort for line in a:out " matches: + " file.ext: SyntaxError: Unexpected token (2:8)sd " stdin: SyntaxError: Unexpected token (2:8) - let l:match = matchlist(line, '^stdin: \(.*\) (\(\d\{1,}\):\(\d\{1,}\)*)') + " [error] file.ext: SyntaxError: Unexpected token (2:8) + let l:match = matchlist(line, '^.*: \(.*\) (\(\d\{1,}\):\(\d\{1,}\)*)') if !empty(l:match) call add(l:errors, { 'bufnr': bufnr('%'), \ 'text': match[1], -- cgit v1.3