diff options
Diffstat (limited to 'syntax/slim.vim')
-rw-r--r-- | syntax/slim.vim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/syntax/slim.vim b/syntax/slim.vim index 71d1e2af..b8d7b6a8 100644 --- a/syntax/slim.vim +++ b/syntax/slim.vim @@ -48,9 +48,10 @@ syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*\[\s*" end="\s*\]\s*" contained contains=slimAttr nextgroup=slimRuby syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*(\s*" end="\s*)\s*" contained contains=slimAttr nextgroup=slimRuby -syn match slimAttr "\s*\%(\w\|-\)\+\s*" contained contains=htmlArg nextgroup=slimAttrAssignment +syn match slimAttr /\s*\%(\w\|-\)\+\s*=/me=e-1 contained contains=htmlArg nextgroup=slimAttrAssignment syn match slimAttrAssignment "\s*=\s*" contained nextgroup=slimWrappedAttrValue,slimAttrString +syn region slimWrappedAttrValue start="[^"']" end="\s\|$" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="{" end="}" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="\[" end="\]" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="(" end=")" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar @@ -65,11 +66,11 @@ syn region slimInterpolation matchgroup=slimInterpolationDelimiter start="#{" en syn region slimInterpolation matchgroup=slimInterpolationDelimiter start="#{{" end="}}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD,slimWrappedAttrs syn match slimInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)" -syn region slimRuby matchgroup=slimRubyOutputChar start="\s*[=]\==[']\=" skip=",\s*$" end="$" contained contains=@slimRubyTop keepend -syn region slimRuby matchgroup=slimRubyChar start="\s*-" skip=",\s*$" end="$" contained contains=@slimRubyTop keepend +syn region slimRuby matchgroup=slimRubyOutputChar start="\s*[=]\==[']\=" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend +syn region slimRuby matchgroup=slimRubyChar start="\s*-" skip="\%\(,\s*\|\\\)$" end="$" contained contains=@slimRubyTop keepend syn match slimComment /^\(\s*\)[/].*\(\n\1\s.*\)*/ contains=slimTodo -syn match slimText /^\(\s*\)[`|'].*\(\n\1\s.*\)*/ +syn match slimText /^\(\s*\)[`|'].*\(\n\1\s.*\)*/ contains=slimInterpolation syn match slimFilter /\s*\w\+:\s*/ contained syn match slimHaml /^\(\s*\)\<haml:\>.*\(\n\1\s.*\)*/ contains=@slimHaml,slimFilter |