A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sheerun/vim-polyglot/commit/ba11e0f1ad214a0696ab48fbfdf06afd08ad2f91 below:

Improve django detection, closes #585 · sheerun/vim-polyglot@ba11e0f · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+3

-2

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+3

-2

lines changed Original file line number Diff line number Diff line change

@@ -298,7 +298,7 @@ func! polyglot#detect#Html(...)

298 298

endif

299 299

for lnum in range(1, min([line("$"), 50]))

300 300

let line = getline(lnum)

301 -

if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)\|{#\s\+'

301 +

if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\|load\)\(\<\|\>\)\|{#\s\+'

302 302

set ft=htmldjango | return

303 303

endif

304 304

if line =~# '\(\<\|\>\)DTD\s\+XHTML\s'

Original file line number Diff line number Diff line change

@@ -188,7 +188,7 @@ rules:

188 188

filetype: mason

189 189

- lines: 50

190 190

rules:

191 -

- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans)\b|{#\s+'

191 +

- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans|load)\b|{#\s+'

192 192

filetype: htmldjango

193 193

- pattern: '\bDTD\s+XHTML\s'

194 194

filetype: xhtml

Original file line number Diff line number Diff line change

@@ -371,6 +371,7 @@ call TestExtension("mason", "mason2.html", "<%filter></%filter>")

371 371

call TestExtension("htmldjango", "jinja2.html", "{% for item in navigation %}{% endfor %}")

372 372

call TestExtension("htmldjango", "jinja3.html", "{% block head %}")

373 373

call TestExtension("htmldjango", "jinja4.html", "{# some comment #}")

374 +

call TestExtension("htmldjango", "jinja3.html", "{% load static %}")

374 375

call TestExtension("xhtml", "xhtml.html", "<DTD XHTML ")

375 376 376 377

" many html templates use {{ }}, e.g. Angular, we should not assume django

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4