From b5c06c2ffa8d1f80e279d176293f6e0c4fdc06e7 Mon Sep 17 00:00:00 2001 From: Daniel Hanson Date: Wed, 16 Sep 2026 14:36:19 -0500 Subject: [PATCH] proof read readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 71dca88..c5dee0e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tree-sitter-django -A [tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for the Django Template Language (DTL) — the `{% %}` tags, `{{ }}` variables and `{# #}` comments used in Django templates. +A [tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for the [Django Template Language (DTL)](https://docs.djangoproject.com/en/6.1/ref/templates/language/#the-django-template-language) — the `{% %}` tags, `{{ }}` variables and `{# #}` comments used in Django templates. ## Coverage @@ -218,7 +218,7 @@ export default grammar(django, { ), loop_block: ($) => seq($.loop_tag, optional($.template)), endloop_tag: ($) => - seq($.endTagOpen, field("tag", "endloop"), $.endTagClose), + seq($.endTagOpen, field("tag_name", "endloop"), $.endTagClose), loop_group: ($) => seq( $.loop_block, @@ -229,7 +229,7 @@ export default grammar(django, { filter: ($, previous) => choice( previous, - seq(field("name", "shout"), ":", field("argument", $.value)), + seq(field("filter_name", "shout"), ":", field("argument", $.value)), ), }, }); @@ -307,10 +307,10 @@ carry on as before. ## Divergences from Django -The grammar aims to accept what Django accepts, with one deliberate exception. Where Django takes an -input without complaint but the input is almost certainly a mistake — it parses, and then silently -renders nothing or quietly ignores half of what was written — the grammar reports an error instead. -Every case below is input Django itself accepts: +The grammar aims to accept what Django accepts, with one deliberate exception: where Django takes an +input without complaint but the input is almost certainly a mistake. It reads the mistake and silently +renders nothing or quietly ignores half of what was written. This grammar tries to report such mistakes +as errors instead. Every case below is input Django itself accepts: - **Number-shaped names.** Django has no number token: a word is a literal if `int()` or `float()` parses it and a variable lookup otherwise, so `0x1f`, `1a`, `1.`, `1.2.3` and `1__0` look up a variable of that