mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
enable syntax highlighting for .jinja2 ext (#4051)
* enable syntax highlighting for .jinja2 ext This is a commonly used jinja (2!) extension * add sample jinja2 file * move jinja to django samples dir * added a link to the jinja docs in the sample file * change sample jinja2 file to a one that exists on GH
This commit is contained in:
committed by
Colin Seymour
parent
2b65318a61
commit
dd3b1eec91
@@ -1745,6 +1745,7 @@ HTML+Django:
|
|||||||
group: HTML
|
group: HTML
|
||||||
extensions:
|
extensions:
|
||||||
- ".jinja"
|
- ".jinja"
|
||||||
|
- ".jinja2"
|
||||||
- ".mustache"
|
- ".mustache"
|
||||||
- ".njk"
|
- ".njk"
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
38
samples/HTML+Django/_worker.jinja2
Normal file
38
samples/HTML+Django/_worker.jinja2
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<h1>Workers</h1>
|
||||||
|
|
||||||
|
<table class="workers">
|
||||||
|
<tr>
|
||||||
|
<th>Job server</th>
|
||||||
|
<th>IP</th>
|
||||||
|
<th>File descriptor</th>
|
||||||
|
<th>Client ID</th>
|
||||||
|
<th>Functions</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% for server_info in server_infos %}
|
||||||
|
<tr {% if server_info['failed'] %} class="failure" {% endif %} >
|
||||||
|
|
||||||
|
<th>{{ server_info['hostport'][0] }}:{{ server_info['hostport'][1] }}</th>
|
||||||
|
<th>
|
||||||
|
{%- if server_info['failed'] -%} Not responding! {%- endif -%}
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% if not server_info['failed'] %}
|
||||||
|
{% for worker in server_info['workers'] %}
|
||||||
|
<tr>
|
||||||
|
<td class="server"></td>
|
||||||
|
<td class="ip">{{ worker['ip'] }}</td>
|
||||||
|
<td class="file_descriptor">{{ worker['file_descriptor'] }}</td>
|
||||||
|
<td class="client_id">{{ worker['client_id'] }}</td>
|
||||||
|
<td class="functions">
|
||||||
|
{{ worker['tasks']|join(', ') }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
Reference in New Issue
Block a user