@@ -119,14 +119,14 @@ pub enum Block {
119119 tag : Tag ,
120120 nodes : Vec <Node >,
121121 },
122- Tag {
122+ Closing {
123123 tag : Tag ,
124124 },
125125 Inclusion {
126126 tag : Tag ,
127127 template_name : String ,
128128 },
129- Closing {
129+ Single {
130130 tag : Tag ,
131131 },
132132}
@@ -194,21 +194,21 @@ Examples:
194194- ` {% else %} `
195195- ` {% empty %} `
196196
197- ##### ` Block::Tag `
197+ ##### ` Block::Closing `
198198
199- Represents standalone tags that do not contain child nodes or require a closing tag .
199+ Represents closing tags corresponding to opening block tags .
200200
201201``` rust
202- Block :: Tag {
203- tag : Tag , // The Tag of the standalone tag
202+ Block :: Closing {
203+ tag : Tag , // The Tag of the closing tag
204204}
205205```
206206
207207Examples:
208208
209- - ` {% csrf_token %} `
210- - ` {% load %} `
211- - ` {% now "Y-m-d" %} `
209+ - ` {% endif %} `
210+ - ` {% endfor %} `
211+ - ` {% endwith %} `
212212
213213##### ` Block::Inclusion `
214214
@@ -226,21 +226,21 @@ Examples:
226226- ` {% include "template.html" %} `
227227- ` {% extends "base.html" %} `
228228
229- ##### ` Block::Closing `
229+ ##### ` Block::Single `
230230
231- Represents closing tags corresponding to opening block tags .
231+ Represents standalone tags that do not contain child nodes or require a closing tag .
232232
233233``` rust
234- Block :: Closing {
235- tag : Tag , // The Tag of the closing tag
234+ Block :: Single {
235+ tag : Tag , // The Tag of the standalone tag
236236}
237237```
238238
239239Examples:
240240
241- - ` {% endif %} `
242- - ` {% endfor %} `
243- - ` {% endwith %} `
241+ - ` {% csrf_token %} `
242+ - ` {% load %} `
243+ - ` {% now "Y-m-d" %} `
244244
245245## TagSpecs
246246
@@ -250,7 +250,7 @@ Tag Specifications (TagSpecs) define how tags are parsed and understood. They al
250250
251251``` toml
252252[package .module .path .tag_name ] # Path where tag is registered, e.g., django.template.defaulttags
253- type = " block" | "inclusion" | "tag "
253+ type = " block" | "inclusion" | "single "
254254closing = " closing_tag_name" # For block tags that require a closing tag
255255branches = [" branch_tag_name" , ...] # For block tags that support branches
256256
@@ -281,7 +281,7 @@ The `name` field in args should match the internal name used in Django's node im
281281 {% include "partial.html" %}
282282 ```
283283
284- - `tag `: Single tags that don't wrap content
284+ - `single `: Single tags that don't wrap content
285285
286286 ```django
287287 {% csrf_token %}
@@ -325,7 +325,7 @@ args = [{ name = "setting", required = true, allowed_values = ["on", "off"] }]
325325
326326```toml
327327[my_module.templatetags.my_tags.my_custom_tag]
328- type = "tag "
328+ type = "single "
329329args = [
330330 { name = "arg1", required = true },
331331 { name = "kwarg1", required = false, is_kwarg = true }
0 commit comments