-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for inline Twig comments
Co-authored-by: Wouter de Jong <[email protected]>
- Loading branch information
1 parent
b4a1031
commit 126cfbf
Showing
3 changed files
with
51 additions
and
7 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 |
---|---|---|
@@ -1,6 +1,30 @@ | ||
<div translate="no" data-loc="1" class="notranslate codeblock codeblock-length-sm codeblock-twig"> | ||
<div translate="no" data-loc="9" class="notranslate codeblock codeblock-length-sm codeblock-twig"> | ||
<div class="codeblock-scroll"> | ||
<pre class="codeblock-lines">1</pre> | ||
<pre class="codeblock-code"><code><span class="hljs-comment">{# some code #}</span></code></pre> | ||
<pre class="codeblock-lines">1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9</pre> | ||
<pre class="codeblock-code"> | ||
<code> | ||
<span class="hljs-comment">{# some code #}</span> | ||
<span class="xml"></span> | ||
<span class="hljs-template-tag"> | ||
{% | ||
<span class="hljs-name"><span class="hljs-keyword">set</span></span> some_var = 'some value' <span class="hljs-comment"># some inline comment</span> | ||
%} | ||
</span> | ||
<span class="xml"></span> | ||
<span class="hljs-template-variable">{{ | ||
<span class="hljs-comment"># another inline comment</span> | ||
'Lorem Ipsum'|uppercase | ||
<span class="hljs-comment"># final inline comment</span> | ||
}}</span> | ||
</code> | ||
</pre> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
|
||
.. code-block:: twig | ||
{# some code #} | ||
{% | ||
set some_var = 'some value' # some inline comment | ||
%} | ||
{{ | ||
# another inline comment | ||
'Lorem Ipsum'|uppercase | ||
# final inline comment | ||
}} |