comparison runtime/syntax/html.vim @ 24024:ef454a7f485d

Update runtime files. Commit: https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 27 16:38:07 2021 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Feb 2021 16:45:04 +0100
parents bceeded72898
children 788e10cec9bd
comparison
equal deleted inserted replaced
24023:9b4821b59aa8 24024:ef454a7f485d
1 " Vim syntax file 1 " Vim syntax file
2 " Language: HTML 2 " Language: HTML
3 " Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> 3 " Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
4 " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> 4 " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
5 " Repository: https://notabug.org/jorgesumle/vim-html-syntax 5 " Repository: https://notabug.org/jorgesumle/vim-html-syntax
6 " Last Change: 2020 Mar 17 6 " Last Change: 2021 Feb 25
7 " Included patch from Florian Breisch to add the summary element 7 " Included patch #7900 to fix comments
8 " 8 "
9 9
10 " Please check :help html.vim for some comments and a description of the options 10 " Please check :help html.vim for some comments and a description of the options
11 11
12 " quit when a syntax file was already loaded 12 " quit when a syntax file was already loaded
139 139
140 " Comments (the real ones or the old netscape ones) 140 " Comments (the real ones or the old netscape ones)
141 if exists("html_wrong_comments") 141 if exists("html_wrong_comments")
142 syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell 142 syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
143 else 143 else
144 syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell 144 " The HTML 5.2 syntax 8.2.4.41-42: bogus comment is parser error; browser skips until next &gt;
145 syn match htmlCommentError contained "[^><!]" 145 " Note: must stand first to get lesser :syn-priority
146 syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell 146 syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError
147 " Normal comment opening <!-- ...>
148 syn region htmlComment start=+<!--+ end=+>+ contains=htmlCommentPart,@Spell
149 " Idem 8.2.4.43-44: <!--> and <!---> are parser errors; browser treats as comments
150 syn match htmlComment "<!---\?>" contains=htmlCommentError
151 " Idem 8.2.4.51: any number of consecutive dashes within comment is okay; --> closes comment
152 " Idem 8.2.4.52: closing comment by dash-dash-bang (--!>) is error ignored by parser(!); closes comment
153 syn region htmlCommentPart contained start=+--+ end=+--!\?>+me=e-1 contains=htmlCommentNested,@htmlPreProc,@Spell
154 " Idem 8.2.4.49: opening nested comment <!-- is parser error, ignored by browser, except <!--> is all right
155 syn match htmlCommentNested contained "<!--[^>]"me=e-1
156 syn match htmlCommentNested contained "<!--->"me=e-3
157 syn match htmlCommentNested contained "<!---\?!>"me=e-4
158 syn match htmlCommentError contained "[^><!]"
147 endif 159 endif
148 syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+ 160 syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
149 161
150 " server-parsed commands 162 " server-parsed commands
151 syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr 163 syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
315 hi def link htmlString String 327 hi def link htmlString String
316 hi def link htmlStatement Statement 328 hi def link htmlStatement Statement
317 hi def link htmlComment Comment 329 hi def link htmlComment Comment
318 hi def link htmlCommentPart Comment 330 hi def link htmlCommentPart Comment
319 hi def link htmlValue String 331 hi def link htmlValue String
332 hi def link htmlCommentNested htmlCommentError
320 hi def link htmlCommentError htmlError 333 hi def link htmlCommentError htmlError
321 hi def link htmlTagError htmlError 334 hi def link htmlTagError htmlError
322 hi def link htmlEvent javaScript 335 hi def link htmlEvent javaScript
323 hi def link htmlError Error 336 hi def link htmlError Error
324 337