summaryrefslogtreecommitdiffstats
path: root/autoload/polyglot.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/polyglot.vim')
-rw-r--r--autoload/polyglot.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim
index 325287fc..d8ee601f 100644
--- a/autoload/polyglot.vim
+++ b/autoload/polyglot.vim
@@ -372,9 +372,12 @@ func! polyglot#DetectHtmlFiletype()
endif
for lnum in range(1, min([line("$"), 50]))
let line = getline(lnum)
- if line =~# '{{.*}}\|{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)'
+ if line =~# '{{.*}}\|{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)\|{#\s\+'
set ft=jinja.html | return
endif
+ if line =~# '\(\<\|\>\)DTD\s\+XHTML\s'
+ set ft=xhtml | return
+ endif
endfor
set ft=html | return
endfunc