fixed html normal region bug
This commit is contained in:
parent
24ca8806da
commit
d8198417ac
|
@ -27,8 +27,9 @@ syn case ignore
|
||||||
" mark illegal characters
|
" mark illegal characters
|
||||||
syn match htmlError "[<>&]"
|
syn match htmlError "[<>&]"
|
||||||
|
|
||||||
|
if main_syntax == 'html'
|
||||||
syn region htmlNormal start=".*" end=".*" contains=TOP,HtmlError,HtmlCommentError,htmlPreProcAttrError
|
syn region htmlNormal start=".*" end=".*" contains=TOP,HtmlError,HtmlCommentError,htmlPreProcAttrError
|
||||||
|
endif
|
||||||
|
|
||||||
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc keepend
|
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc keepend
|
||||||
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc keepend
|
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc keepend
|
||||||
|
@ -252,10 +253,16 @@ endif
|
||||||
|
|
||||||
syn keyword htmlTagName contained noscript
|
syn keyword htmlTagName contained noscript
|
||||||
syn keyword htmlSpecialTagName contained script style
|
syn keyword htmlSpecialTagName contained script style
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if main_syntax != 'java' || exists("java_javascript")
|
if main_syntax != 'java' || exists("java_javascript")
|
||||||
" JAVA SCRIPT
|
" JAVA SCRIPT
|
||||||
syn include @htmlJavaScript syntax/javascript.vim
|
if main_syntax != "javascript"
|
||||||
unlet b:current_syntax
|
syn include @htmlJavaScript syntax/javascript.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
syn region javaScript start=+<script\_[^>]*>+hs=s+1 keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
syn region javaScript start=+<script\_[^>]*>+hs=s+1 keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||||
syn region htmlScriptTag contained start=+<script+hs=s+1 end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
syn region htmlScriptTag contained start=+<script+hs=s+1 end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||||
hi def link htmlScriptTag htmlTag
|
hi def link htmlScriptTag htmlTag
|
||||||
|
@ -277,6 +284,11 @@ if main_syntax != 'java' || exists("java_javascript")
|
||||||
syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc
|
syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if main_syntax != 'java' || exists("java_vb")
|
if main_syntax != 'java' || exists("java_vb")
|
||||||
" VB SCRIPT
|
" VB SCRIPT
|
||||||
syn include @htmlVbScript syntax/vb.vim
|
syn include @htmlVbScript syntax/vb.vim
|
||||||
|
|
|
@ -3,17 +3,20 @@
|
||||||
" Maintainer: vim-javascript community
|
" Maintainer: vim-javascript community
|
||||||
" URL: https://github.com/pangloss/vim-javascript
|
" URL: https://github.com/pangloss/vim-javascript
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("main_syntax")
|
if !exists("main_syntax")
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
runtime! syntax/html_custom.vim
|
|
||||||
unlet b:current_syntax
|
|
||||||
let main_syntax = 'javascript'
|
let main_syntax = 'javascript'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
runtime! syntax/html_custom.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Dollar sign is permitted anywhere in an identifier
|
" Dollar sign is permitted anywhere in an identifier
|
||||||
if v:version > 704 || v:version == 704 && has('patch1142')
|
if v:version > 704 || v:version == 704 && has('patch1142')
|
||||||
|
|
Loading…
Reference in New Issue