docs icon indicating copy to clipboard operation
docs copied to clipboard

Latte: |noescape is order independent

Open martinsifra opened this issue 5 years ago • 2 comments

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.

martinsifra avatar Feb 05 '20 13:02 martinsifra

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)

dg avatar Feb 09 '20 15:02 dg

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.

martinsifra avatar Feb 10 '20 09:02 martinsifra