Allow newlines inside {% %} tags

The changes listed in the old PR are pretty big compared to the changes I made, and there are no tests there to motivate the changes so it’s a bit hard to understand if my attempt to implement is just hopelessly naive or if the previous PR was over engineering or feature creeping.

Maybe someone can come up with some nasty template test cases?

1 Like

Reading the old PR it seems there’s at least some feature creep. I think my proposal, being opt in, will not have some of the issues that some of the old PR tried to handle. I also think we can do this in two steps:

  1. implement the basic thing I did above
  2. talk about the option and have people try it but do NOT turn it on for createproject
  3. if no problems are found, turn it on for createproject
  4. deprecate the old thing
  5. (very much later) hard switch and remove the old code

What do you think?

Ticket created here: #35899 (Allow newlines in {% %} tags) – Django

If people think this is a good idea, I’ll just push create PR for this and we can get this going.

1 Like