-
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TwigComponent] Minimal support of comment lines #2464
base: 2.x
Are you sure you want to change the base?
Conversation
Twig introduced the inline comments in twigphp/Twig#4349 This PR add minimal support for it the PreLexer / HTML syntax ```twig <twig:Button # comment bar="bar" /> ``` I'd like some IRL feedbacks on this one :)
Twig introduced the inline comments in twigphp/Twig#4349 This PR add minimal support for it the PreLexer / HTML syntax ```twig <twig:Button # comment bar="bar" /> ``` I'd like some IRL feedbacks on this one :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
I don't have real use-cases from the projets I'm working on, but I believe it will be super-useful (even if I believe some comments can be avoid by using good attribute's name or variable!)
However, introducing a new syntax means that tools manipulating ASTs (like IDEs, Twig-CS-Fixer, maybe TwigStan, and syntax highlighting) will break, right?
Not at all, they already are compatible. I'm just following Twig syntax here, not adding anything new. But that means adapting the PreLexer we use to convert HTML Syntax into regular Twig code :) |
They do, and they integrated inline comments right after Twig release :)
Me neither but... how is this related to this PR ? :) I'm genuinely not sure to get the questions here. Twig syntax changes are generally pretty quickly integrated into PhpStorm Twig integration (or in the Symfony plugin). |
Twig introduced the inline comments in twigphp/Twig#4349
This PR add minimal support for it the PreLexer / HTML syntax
I'd like some IRL feedbacks on this one :)