aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authormitermayer <mitermayer.reis@gmail.com>2017-11-07 22:40:16 -0800
committermitermayer <mitermayer.reis@gmail.com>2017-11-07 22:40:16 -0800
commit8009900cdff668d0b7f84ebefe2b7f3ab817b779 (patch)
treebde052e6545110a99321b6f220538b03d236d948 /autoload
parent327fc0ccf42c5e9c27fb835018f449f79240c0f8 (diff)
downloadvim-prettier-8009900cdff668d0b7f84ebefe2b7f3ab817b779.tar.xz
Fixing error matching regex to match new prettier CLI errors
- Adapting the CLI error message parsing to handle new prettier error output format
Diffstat (limited to 'autoload')
-rw-r--r--autoload/prettier.vim4
1 files changed, 3 insertions, 1 deletions
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],