summaryrefslogtreecommitdiffstats
path: root/syntax/html.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-07 21:51:30 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-07 21:51:30 +0200
commit4bec20ec1a7cde0c29d9550d244f428484fa56ab (patch)
tree9d0e03e25083e1e9f313150ccdf435a15bcab789 /syntax/html.vim
parent9f4e2b683453c9521de8164169327a112d71f6c1 (diff)
downloadvim-polyglot-4.13.2.tar.gz
vim-polyglot-4.13.2.zip
Fix test and loading of filetypes, closes #577v4.13.2
Diffstat (limited to 'syntax/html.vim')
-rw-r--r--syntax/html.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/syntax/html.vim b/syntax/html.vim
index 633a157e..43db7575 100644
--- a/syntax/html.vim
+++ b/syntax/html.vim
@@ -19,6 +19,17 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
" Modified: htdebeer <H.T.de.Beer@gmail.com>
" Changes: add common SVG elements and attributes for inline SVG
+" 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
+
" Patch 7.4.1142
if has("patch-7.4-1142")
if has("win32")
@@ -192,5 +203,13 @@ syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemul
syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace
syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref
+let b:current_syntax = "html"
+
+if main_syntax == 'html'
+ unlet main_syntax
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
endif