Improve django detection, closes #585

This commit is contained in:
Adam Stankiewicz
2020-10-14 23:26:36 +02:00
parent c45f0b8f64
commit ba11e0f1ad
3 changed files with 3 additions and 2 deletions

View File

@@ -298,7 +298,7 @@ func! polyglot#detect#Html(...)
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\)\(\<\|\>\)\|{#\s\+'
if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\|load\)\(\<\|\>\)\|{#\s\+'
set ft=htmldjango | return
endif
if line =~# '\(\<\|\>\)DTD\s\+XHTML\s'