From dd3b1eec911072ca051ecccabc03a47bafa2c76c Mon Sep 17 00:00:00 2001 From: Steve Pike Date: Tue, 6 Mar 2018 13:53:24 +0000 Subject: [PATCH] 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 --- lib/linguist/languages.yml | 1 + samples/HTML+Django/_worker.jinja2 | 38 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 samples/HTML+Django/_worker.jinja2 diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 83abb6a0..f2a54852 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1745,6 +1745,7 @@ HTML+Django: group: HTML extensions: - ".jinja" + - ".jinja2" - ".mustache" - ".njk" aliases: diff --git a/samples/HTML+Django/_worker.jinja2 b/samples/HTML+Django/_worker.jinja2 new file mode 100644 index 00000000..0a74321d --- /dev/null +++ b/samples/HTML+Django/_worker.jinja2 @@ -0,0 +1,38 @@ +

Workers

+ + + + + + + + + + +{% for server_info in server_infos %} + + + + + + + + + + {% if not server_info['failed'] %} + {% for worker in server_info['workers'] %} + + + + + + + + {% endfor %} + {% endif %} +{% endfor %} +
Job serverIPFile descriptorClient IDFunctions
{{ server_info['hostport'][0] }}:{{ server_info['hostport'][1] }} + {%- if server_info['failed'] -%} Not responding! {%- endif -%} +
{{ worker['ip'] }}{{ worker['file_descriptor'] }}{{ worker['client_id'] }} + {{ worker['tasks']|join(', ') }} +