pongo2 icon indicating copy to clipboard operation
pongo2 copied to clipboard

pongo lexer does not returns exact tag/variable in case of error

Open RO-29 opened this issue 7 years ago • 2 comments

"test\r\n{%if..\n%}" or "test\r\n{{test\n}}"

[Error (where: lexer) in <string> | Line 2 Col 7] Newline not allowed within tag/variable.

Can we return the defaulting tag/variable also? Expected [Error (where: lexer) in <string> | Line 2 Col 3] Newline not allowed within tag/variable. {{test\n}}

[Error (where: lexer) in <string> | Line 2 Col 3] Newline not allowed within tag/variable. test\r\n{%if..\n%}

It is an issue to search for exact tag/variable when we have a huge template.

RO-29 avatar Apr 13 '18 12:04 RO-29

Would you consider creating a PR for that? :)

flosch avatar Apr 13 '18 12:04 flosch

sure 😄

RO-29 avatar Apr 13 '18 13:04 RO-29