diff options
Diffstat (limited to 'syntax/html.vim')
-rw-r--r-- | syntax/html.vim | 512 |
1 files changed, 186 insertions, 326 deletions
diff --git a/syntax/html.vim b/syntax/html.vim index 2db2fe2d..46ed2b53 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -1,336 +1,196 @@ -if polyglot#init#is_disabled(expand('<sfile>:p'), 'html', 'syntax/html.vim') +if polyglot#init#is_disabled(expand('<sfile>:p'), 'html5', 'syntax/html.vim') finish endif " Vim syntax file -" Language: HTML -" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> -" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> -" Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2021 Mar 02 -" Included patch #7900 to fix comments -" Included patch #7916 to fix a few more things +" Language: HTML (version 5.1) +" SVG (SVG 1.1 Second Edition) +" MathML (MathML 3.0 Second Edition) +" Last Change: 2017 Mar 07 +" License: Public domain +" (but let me know if you like :) ) " - -" Please check :help html.vim for some comments and a description of the options - -" quit when a syntax file was already loaded -if !exists("main_syntax") - if exists("b:current_syntax") - finish - endif - let main_syntax = 'html' -endif - -let s:cpo_save = &cpo -set cpo&vim - -syntax spell toplevel - -syn case ignore - -" mark illegal characters -syn match htmlError "[<>&]" - - -" tags -syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc -syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc -syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc -syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError -syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster -syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster -syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster -syn match htmlTagError contained "[^>]<"ms=s+1 - - -" tag names -syn keyword htmlTagName contained address applet area a base basefont -syn keyword htmlTagName contained big blockquote br caption center -syn keyword htmlTagName contained cite code dd dfn dir div dl dt font -syn keyword htmlTagName contained form hr html img -syn keyword htmlTagName contained input isindex kbd li link map menu -syn keyword htmlTagName contained meta ol option param pre p samp span -syn keyword htmlTagName contained select small sub sup -syn keyword htmlTagName contained table td textarea th tr tt ul var xmp -syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" - -" new html 4.0 tags -syn keyword htmlTagName contained abbr acronym bdo button col label -syn keyword htmlTagName contained colgroup fieldset iframe ins legend -syn keyword htmlTagName contained object optgroup q s tbody tfoot thead - -" new html 5 tags -syn keyword htmlTagName contained article aside audio bdi canvas data -syn keyword htmlTagName contained datalist details dialog embed figcaption -syn keyword htmlTagName contained figure footer header hgroup keygen main -syn keyword htmlTagName contained mark menuitem meter nav output picture -syn keyword htmlTagName contained progress rb rp rt rtc ruby section -syn keyword htmlTagName contained slot source summary template time track -syn keyword htmlTagName contained video wbr - -" legal arg names -syn keyword htmlArg contained action -syn keyword htmlArg contained align alink alt archive background bgcolor -syn keyword htmlArg contained border bordercolor cellpadding -syn keyword htmlArg contained cellspacing checked class clear code codebase color -syn keyword htmlArg contained cols colspan content coords enctype face -syn keyword htmlArg contained gutter height hspace id -syn keyword htmlArg contained link lowsrc marginheight -syn keyword htmlArg contained marginwidth maxlength method name prompt -syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape -syn keyword htmlArg contained size src start target text type url -syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap -syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 - -" aria attributes -exe 'syn match htmlArg contained "\<aria-\%(' . join([ - \ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount', - \ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details', - \ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed', - \ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level', - \ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns', - \ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required', - \ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize', - \ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext' - \ ], '\|') . '\)\>"' -syn keyword htmlArg contained role - -" Netscape extensions -syn keyword htmlTagName contained frame noframes frameset nobr blink -syn keyword htmlTagName contained layer ilayer nolayer spacer -syn keyword htmlArg contained frameborder noresize pagex pagey above below -syn keyword htmlArg contained left top visibility clip id noshade -syn match htmlArg contained "\<z-index\>" - -" Microsoft extensions -syn keyword htmlTagName contained marquee - -" html 4.0 arg names -syn match htmlArg contained "\<\(accept-charset\|label\)\>" -syn keyword htmlArg contained abbr accept accesskey axis char charoff charset -syn keyword htmlArg contained cite classid codetype compact data datetime -syn keyword htmlArg contained declare defer dir disabled for frame -syn keyword htmlArg contained headers hreflang lang language longdesc -syn keyword htmlArg contained multiple nohref nowrap object profile readonly -syn keyword htmlArg contained rules scheme scope span standby style -syn keyword htmlArg contained summary tabindex valuetype version - -" html 5 arg names -syn keyword htmlArg contained allowfullscreen async autocomplete autofocus -syn keyword htmlArg contained autoplay challenge contenteditable contextmenu -syn keyword htmlArg contained controls crossorigin default dirname download -syn keyword htmlArg contained draggable dropzone form formaction formenctype -syn keyword htmlArg contained formmethod formnovalidate formtarget hidden -syn keyword htmlArg contained high icon inputmode keytype kind list loop low -syn keyword htmlArg contained max min minlength muted nonce novalidate open -syn keyword htmlArg contained optimum pattern placeholder poster preload -syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck -syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate -syn keyword htmlArg contained typemustmatch - -" special characters -syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" - -" Comments (the real ones or the old netscape ones) -if exists("html_wrong_comments") - syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell -else - " The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next > - syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend - " Idem 8.2.4.42,51: Comment starts with <!-- and ends with --> - " Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors - " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment - syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend - " Idem 8.2.4.49: nested comment is parser error, except <!--> is all right - syn match htmlCommentNested contained "<!-->\@!" - syn match htmlCommentError contained "[^><!]" -endif -syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend - -" server-parsed commands -syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr -syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" -syn match htmlPreError contained "<!--#\S*"ms=s+4 -syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName -syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend -syn match htmlPreProcAttrError contained "\w\+="he=e-1 -syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 - -if !exists("html_no_rendering") - " rendering - syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc - - syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop - syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop - - syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic - syn region htmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic - syn region htmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic - syn region htmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline - syn region htmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline - syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop - syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop - syn region htmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic - - syn region htmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic - syn region htmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic - syn region htmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic - syn region htmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold - syn region htmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold - syn region htmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop - syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop - syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop - syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop - - syn region htmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline - syn region htmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop - syn region htmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline - syn region htmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline - syn region htmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop - syn region htmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlItalicUnderlineBold - syn region htmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop - syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop - - syn match htmlLeadingSpace "^\s\+" contained - syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc - syn region htmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@htmlTop - syn region htmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@htmlTop - syn region htmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@htmlTop - syn region htmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@htmlTop - syn region htmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@htmlTop - syn region htmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@htmlTop - syn region htmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc - syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc -endif - -syn keyword htmlTagName contained noscript -syn keyword htmlSpecialTagName contained script style -if main_syntax != 'java' || exists("java_javascript") - " JAVA SCRIPT - syn include @htmlJavaScript syntax/javascript.vim - unlet b:current_syntax - syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc - syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent - hi def link htmlScriptTag htmlTag - - " html events (i.e. arguments that include javascript commands) - if exists("html_extended_events") - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ +" Note: This file just add new tags from HTML 5 +" and don't replace default html.vim syntax file +" +" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com ) +" Changes: update to Draft 2016 Jan 13 +" add microdata Attributes +" Maintainer: Rodrigo Machado <rcmachado@gmail.com> +" URL: http://rm.blog.br/vim/syntax/html.vim +" Modified: htdebeer <H.T.de.Beer@gmail.com> +" Changes: add common SVG elements and attributes for inline SVG + +" Patch 7.4.1142 +if has("patch-7.4-1142") + if has("win32") + syn iskeyword @,48-57,_,128-167,224-235,- else - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ + syn iskeyword @,48-57,_,192-255,- endif - syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript - syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript - hi def link htmlEventSQ htmlEvent - hi def link htmlEventDQ htmlEvent - - " a javascript expression is used as an arg value - syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc endif -if main_syntax != 'java' || exists("java_vb") - " VB SCRIPT - syn include @htmlVbScript syntax/vb.vim - unlet b:current_syntax - syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc -endif - -syn cluster htmlJavaScript add=@htmlPreproc - -if main_syntax != 'java' || exists("java_css") - " embedded style sheets - syn keyword htmlArg contained media - syn include @htmlCss syntax/css.vim - unlet b:current_syntax - syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc - syn match htmlCssStyleComment contained "\(<!--\|-->\)" - syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc - hi def link htmlStyleArg htmlString -endif - -if main_syntax == "html" - " synchronizing (does not always work if a comment includes legal - " html tags, but doing it right would mean to always start - " at the first line, which is too slow) - syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" - syn sync match htmlHighlight groupthere javaScript "<script" - syn sync match htmlHighlightSkip "^.*['\"].*$" - syn sync minlines=10 -endif - -" The default highlighting. -hi def link htmlTag Function -hi def link htmlEndTag Identifier -hi def link htmlArg Type -hi def link htmlTagName htmlStatement -hi def link htmlSpecialTagName Exception -hi def link htmlValue String -hi def link htmlSpecialChar Special - -if !exists("html_no_rendering") - hi def link htmlH1 Title - hi def link htmlH2 htmlH1 - hi def link htmlH3 htmlH2 - hi def link htmlH4 htmlH3 - hi def link htmlH5 htmlH4 - hi def link htmlH6 htmlH5 - hi def link htmlHead PreProc - hi def link htmlTitle Title - hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic - hi def link htmlUnderlineBold htmlBoldUnderline - hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic - hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic - hi def link htmlItalicUnderline htmlUnderlineItalic - hi def link htmlItalicBold htmlBoldItalic - hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic - hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic - hi def link htmlLink Underlined - hi def link htmlLeadingSpace None - if !exists("html_my_rendering") - hi def htmlBold term=bold cterm=bold gui=bold - hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline - hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline - hi def htmlUnderline term=underline cterm=underline gui=underline - hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline - hi def htmlItalic term=italic cterm=italic gui=italic - if v:version > 800 || v:version == 800 && has("patch1038") - hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough - else - hi def htmlStrike term=underline cterm=underline gui=underline - endif - endif -endif - -hi def link htmlPreStmt PreProc -hi def link htmlPreError Error -hi def link htmlPreProc PreProc -hi def link htmlPreAttr String -hi def link htmlPreProcAttrName PreProc -hi def link htmlPreProcAttrError Error -hi def link htmlString String -hi def link htmlStatement Statement -hi def link htmlComment Comment -hi def link htmlCommentNested htmlError -hi def link htmlCommentError htmlError -hi def link htmlTagError htmlError -hi def link htmlEvent javaScript -hi def link htmlError Error - -hi def link javaScript Special -hi def link javaScriptExpression javaScript -hi def link htmlCssStyleComment Comment -hi def link htmlCssDefinition Special - -let b:current_syntax = "html" - -if main_syntax == 'html' - unlet main_syntax -endif +" HTML 5 tags +syn keyword htmlTagName contained article aside audio canvas command +syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer +syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output +syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data +syn keyword htmlTagName contained template content shadow slot +syn keyword htmlTagName contained wbr bdi +syn keyword htmlTagName contained picture + +" SVG tags +" http://www.w3.org/TR/SVG/ +" as found in http://www.w3.org/TR/SVG/eltindex.html +syn keyword htmlTagName contained svg +syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem +syn keyword htmlTagName contained animate animateColor animateMotion animateTransform +syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path +syn keyword htmlTagName contained clipPath color-profile cursor +syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject +syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence +syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri +syn keyword htmlTagName contained glyph glyphRef hkern +syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop +syn keyword htmlTagName contained missing-glyph mpath +syn keyword htmlTagName contained text textPath tref tspan vkern +syn keyword htmlTagName contained metadata title + +" MathML tags +" https://www.w3.org/TR/MathML3/appendixi.html#index.elem +syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth +syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind +syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes +syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch +syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication +syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false +syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary +syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda +syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt +syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose +syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv +syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts +syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow +syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder +syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or +syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product +syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev +syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh +syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union +syn keyword htmlTagName contained uplimit variance vector vectorproduct xor + +" Custom Element +syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>" +syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>" + +" HTML 5 arguments +" Core Attributes +syn keyword htmlArg contained accesskey class contenteditable contextmenu dir +syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate +" Event-handler Attributes +syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange +syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover +syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange +syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata +syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup +syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange +syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate +syn keyword htmlArg contained onvolumechange onwaiting +" XML Attributes +syn keyword htmlArg contained xml:lang xml:space xml:base xmlns +" new features +" <body> +syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload +syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload +" <video>, <audio>, <source>, <track> +syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track playsinline +" <form>, <input>, <button> +syn keyword htmlArg contained form autocomplete autofocus list min max step +syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate +syn keyword htmlArg contained required placeholder pattern +" <command>, <details>, <time> +syn keyword htmlArg contained label icon open datetime-local pubdate +" <script> +syn keyword htmlArg contained async +" <content> +syn keyword htmlArg contained select +" <iframe> +syn keyword htmlArg contained seamless srcdoc sandbox allowfullscreen allowusermedia allowpaymentrequest allowpresentation +" <picture> +syn keyword htmlArg contained srcset sizes +" <a> +syn keyword htmlArg contained download media +" <script>, <style> +syn keyword htmlArg contained nonce +" <area>, <a>, <img>, <iframe>, <link> +syn keyword htmlArg contained referrerpolicy +" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute +syn keyword htmlArg contained integrity crossorigin +" <link> +syn keyword htmlArg contained prefetch +" syn keyword htmlArg contained preload +" <img> +syn keyword htmlArg contained decoding +" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers +syn keyword htmlArg contained onselectstart onselectionchange +" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading +syn keyword htmlArg contained loading + +" Custom Data Attributes +" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes +syn match htmlArg "\<data[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained + +" Vendor Extension Attributes +" http://w3c.github.io/html/single-page.html#conformance-requirements-extensibility +syn match htmlArg "\<x[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained + +" Microdata +" http://dev.w3.org/html5/md/ +syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref + +" SVG +" http://www.w3.org/TR/SVG/ +" Some common attributes from http://www.w3.org/TR/SVG/attindex.html +syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth +syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by +syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy +syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy +syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired +syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy +syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits +syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-x horiz-origin-y +syn keyword htmlArg contained id ideographic in in2 intercept +syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes +syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local +syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name +syn keyword htmlArg contained numOctaves +syn keyword htmlArg contained offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness +syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits +syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry +syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage +syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type +syn keyword htmlArg contained u1 u2 underline-position underline-thickness unicode unicode-range units-per-em +syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget +syn keyword htmlArg contained width widths +syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space +syn keyword htmlArg contained y y1 y2 yChannelSelector +syn keyword htmlArg contained z zoomAndPan +syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode + +" MathML attributes +" https://www.w3.org/TR/MathML3/chapter2.html#interf.toplevel.atts +syn keyword htmlArg contained accent accentunder actiontype align alignmentscope altimg altimg-height altimg-valign altimg-width alttext +syn keyword htmlArg contained annotation-xml background base baseline bevelled cd cdgroup charalign charspacing close +syn keyword htmlArg contained closure color columnalign columnalignment columnlines columnspacing columnspan columnwidth crossout decimalpoint +syn keyword htmlArg contained definitionURL denomalign depth display displaystyle edge encoding equalcolumns equalrows fence +syn keyword htmlArg contained fontfamily fontsize fontstyle fontweight form frame framespacing groupalign height indentalign +syn keyword htmlArg contained indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget index infixlinebreakstyle integer largeop +syn keyword htmlArg contained leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote +syn keyword htmlArg contained lspace ltr macros math mathbackground mathcolor mathsize mathvariant maxsize maxwidth +syn keyword htmlArg contained mediummathspace menclose minlabelspacing minsize mode movablelimits msgroup mslinethickness name nargs +syn keyword htmlArg contained newline notation numalign number occurrence open order other overflow position +syn keyword htmlArg contained rightoverhang role rowalign rowlines rowspacing rowspan rquote rspace schemaLocation scope +syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemultiplier selection separator separators shift side stackalign +syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace +syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref -let &cpo = s:cpo_save -unlet s:cpo_save -" vim: ts=8 |