-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #323. Add language Swig with grammar HTML (Swig)
- Loading branch information
Showing
7 changed files
with
120 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{# Comment #} | ||
|
||
{# Unindented without and with HTML indentation#} | ||
{% block blockname %} | ||
<section> | ||
<ul> | ||
<li>TestText1</li> | ||
</ul> | ||
</section> | ||
{% for foo in bar %} | ||
{% if condition %} | ||
<aside class="test1"> | ||
TestText2 | ||
</aside> | ||
{% else %} | ||
<div class="test2"> | ||
TestText3 | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
{% endblock %} | ||
|
||
{# On the same line #} | ||
|
||
{% set name = value %} | ||
|
||
{% include "file" with context only %} | ||
|
||
{% extends "file" %} | ||
|
||
{# Indented wrong #} | ||
|
||
{% parent %} | ||
|
||
{% import "file" as varname %} | ||
|
||
{% macro name args %} | ||
TestText4 | ||
{% endmacro %} | ||
|
||
{% tag %} | ||
TestText5 | ||
{% end %} | ||
|
||
{% autoescape on "js" %} | ||
TestText6 | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{# Comment #} | ||
|
||
{# Unindented without and with HTML indentation#} | ||
{% block blockname %} | ||
<section> | ||
<ul> | ||
<li>TestText1</li> | ||
</ul> | ||
</section> | ||
{% for foo in bar %} | ||
{% if condition %} | ||
<aside class="test1"> | ||
TestText2 | ||
</aside> | ||
{% else %} | ||
<div class="test2"> | ||
TestText3 | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
{% endblock %} | ||
|
||
{# On the same line #} | ||
|
||
{% set name = value %} {% include "file" with context only %} {% extends "file" %} | ||
|
||
{# Indented wrong #} | ||
|
||
{% parent %} | ||
|
||
{% import "file" as varname %} | ||
|
||
{% macro name args %} | ||
TestText4 | ||
{% endmacro %} | ||
|
||
{% tag %} | ||
TestText5 | ||
{% end %} | ||
|
||
{% autoescape on "js" %} | ||
TestText6 | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ module.exports = class Languages | |
"scss" | ||
"spacebars" | ||
"sql" | ||
"swig" | ||
"tss" | ||
"typescript" | ||
"vala" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
|
||
name: "Swig" | ||
namespace: "swig" | ||
fallback: ['html'] | ||
|
||
### | ||
Supported Grammars | ||
### | ||
grammars: [ | ||
"HTML (Swig)" | ||
"SWIG" | ||
] | ||
|
||
### | ||
Supported extensions | ||
### | ||
extensions: [ | ||
'swig' | ||
] | ||
|
||
options: [] | ||
|
||
} |