So I understand that {%- -%}
, iterable creation and a few other features borrowed from Jinja will never make it into the DTL.
Is it at least possible to modularize some parts to allow creation of a custom version of the DTL without having to rewrite everything or resort to use Jinja? I’m talking about changes that won’t change the DTL in the slightest, just make it easier to introduce extension point.
Off the top of my head, I think about making the lexer and parser switchable with something like Template.lexer_class
and Template.parser_class
, making the tag regex and the token class class variables of the Lexer
, and, generally speaking, make Lexer.create_token
more modular.
Would at least this, be acceptable to merge in Django?