[1.7.x] Fixed #22753 -- Documented ability to use a note with the {% comment %} tag.
Backport of e020894470
from master
This commit is contained in:
parent
170255caf4
commit
cb3266c1b0
|
@ -52,11 +52,13 @@ comment
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
Ignores everything between ``{% comment %}`` and ``{% endcomment %}``.
|
Ignores everything between ``{% comment %}`` and ``{% endcomment %}``.
|
||||||
|
An optional note may be inserted in the first tag. For example, this is
|
||||||
|
useful when commenting out code for documenting why the code was disabled.
|
||||||
|
|
||||||
Sample usage::
|
Sample usage::
|
||||||
|
|
||||||
<p>Rendered text with {{ pub_date|date:"c" }}</p>
|
<p>Rendered text with {{ pub_date|date:"c" }}</p>
|
||||||
{% comment %}
|
{% comment "Optional note" %}
|
||||||
<p>Commented out text with {{ create_date|date:"c" }}</p>
|
<p>Commented out text with {{ create_date|date:"c" }}</p>
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue