Fix for longstrings.

This commit is contained in:
Bruce Hill 2017-09-14 04:23:04 -07:00
parent 875b009e41
commit 818b7aed7f

View File

@ -21,16 +21,20 @@ hi def link nomsuOneLineComment Comment
syn region nomsuComment start=/#\.\.[^\n]*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1
hi def link nomsuComment Comment
syn region nomsuString1 start=/"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/"/
syn region nomsuString1 start=/"\(\(\.\."\)\@!\|\.\."\s*|.*$\)/ skip=/\\\\\|\\"/ end=/"/
hi def link nomsuString1 String
syn region nomsuStringLine start=/"\.\."/ end=/$/
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace,nomsuOneLineComment,nomsuComment
hi def link nomsuStringLine String
syn match nomsuStringLineStart /\(^[ \t]*\|"\.\."\s*\)\@<=|/ contained
hi def link nomsuStringLineStart Delimiter
syn match nomsuStringTrailingSpace /[ \t]*$/ contained
hi nomsuStringTrailingSpace ctermbg=Magenta
syn region nomsuLongString start=/\(^\z(\s*\)\S.*\)\@<="\.\."/ skip=/^\(\z1\s\|\s*$\)/ end=/\n\(\z1\s\)\@!/me=s-1
syn region nomsuLongString start=/"\.\."[^\n]*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace,nomsuOneLineComment,nomsuComment
hi def link nomsuLongString String