Closed ezhlobo closed 6 years ago
The main reason why I created this PR is to get feedback about my direction.
Looks good. Ping me once you've fixed build & made the changes you want to make.
I don't have a strong opinion on whether we should support div(data-whatever!="some string that does not contain any special characters")
or not.
Please can you address the other small comments though.
@ForbesLindesay thank you for your review. I addressed all your comments and removed my workaround because there is new version of pug-lexer (that made it for us).
The question about checking tags in scripts is still open. I would suggest to create a separate issue and discuss it there, because anyway it did not work as expected before this PR. Does it work for you? We can actually remember all use cases of unescaped values and think up how to handle them best...
I'm not sure if it worked for me or not, I haven't actually made use of that bit anyway.
@ForbesLindesay hey, I pushed updates according to our discussion. Need your attention one more time.
you've dropped the BooleanLiteral case there. Is that intentional?
Yes. Now all boolean attributes come to us with mustEscape: true
, so it is not necessary for us.
But the following example will throw an error and it's intentionally:
div(name!=true)
Thanks :)
Thank you very much for your time and patience
It adds supporting of shorthands in attributes. Initial issue #1 (Fails on boolean attributes).
Now following syntax won't throw an error:
But this one will throw:
Checklist:
context.error
instead ofnew Error
to keep well-described errorspug-lexer
and remove workaround to keepmustEscape
correct