#23356: Unable to create template tag which behaves similar to {% verbatim %}
-------------------------------------+-------------------------------------
Reporter: Jacob Rief | Owner: Atul
Type: | Bhouraskar
Cleanup/optimization | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: verbatim | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Chris Jerdonek):
> Currently the `Lexer.create_token()` logic returns tokens of type
`TokenType.TEXT` if it encounters a `{% verbatim %}` tag. This change
removes this logic, ie. tokens are created as normal,
It seems like making this change would make it harder to fix #23424 and
might even be incompatible with fixing it. The reason is that changing
things in this way would require tokens to be parsed before finding the
end of the verbatim tag, whereas fixing that bug would require looking for
the end of the verbatim tag before attempting to parse tokens in between.
Thus, I would suggest fixing the bug in #23424 (and adding test cases)
before reworking the implementation into a way that might be incompatible
with fixing it.
--
Ticket URL: <https://code.djangoproject.com/ticket/23356#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.1775d958254ad5029f4ce496a362b62c%40djangoproject.com.