Преглед изворни кода

Fixed #22753 -- Documented ability to use a note with the {% comment %} tag.

Bryce Nesbitt пре 10 година
родитељ
комит
e020894470
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      docs/ref/templates/builtins.txt

+ 3 - 1
docs/ref/templates/builtins.txt

@@ -52,11 +52,13 @@ comment
 ^^^^^^^
 
 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::
 
     <p>Rendered text with {{ pub_date|date:"c" }}</p>
-    {% comment %}
+    {% comment "Optional note" %}
         <p>Commented out text with {{ create_date|date:"c" }}</p>
     {% endcomment %}