From f8cb300890a4352379df00fe05eb2cf91d1405b4 Mon Sep 17 00:00:00 2001 From: kongo2002 Date: Sun, 26 Dec 2010 10:33:49 +0800 Subject: [PATCH] haml: small regex tune --- syntax_checkers/haml.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/haml.vim b/syntax_checkers/haml.vim index a60412e7..4d2801fe 100644 --- a/syntax_checkers/haml.vim +++ b/syntax_checkers/haml.vim @@ -23,8 +23,8 @@ function! SyntaxCheckers_haml_GetLocList() let output = system("haml -c " . shellescape(expand("%"))) if v:shell_error != 0 "haml only outputs the first error, so parse it ourselves - let line = substitute(output, '^\(Syntax\|Haml\) error on line \(\d*\):.*', '\2', '') - let msg = substitute(output, '^\(Syntax\|Haml\) error on line \d*:\(.*\)', '\2', '') + let line = substitute(output, '^\%(Syntax\|Haml\) error on line \(\d*\):.*', '\1', '') + let msg = substitute(output, '^\%(Syntax\|Haml\) error on line \d*:\(.*\)', '\1', '') return [{'lnum' : line, 'text' : msg, 'bufnr': bufnr(""), 'type': 'E' }] endif return []