docs
docs copied to clipboard
Latte: |noescape is order independent
Good news everyone,
as all we know Latte filters are applied from left to right - except |noecape. Internaly ecaping is just a flag turning off escaping of current literal. (Hope I've found the correct source doing this.)
In documentation there is no mention the order in filters of |noescape matters.
PS: I'd like to add this note, bute there's no way how to edit Latte docs.
It works as you write. Do you have any idea when this behavior might confuse someone?
(Latte docs is in branch nette.org https://github.com/nette/docs/tree/nette.org)
If you don't it's just a flag, there can be misunderstanding when combine with other filters. You start thinking if comes firt translation or escaping, replace or escapint, etc. But the result is that everything goes in the left to right order and after all is noescape applied.
I must be blind. I didn't see latte folder in docs repo 😀 Thank you, I'll add this note.