Skip to content
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

[BUG] Syntax highlighting #32

Open
YummYume opened this issue Oct 18, 2023 · 8 comments
Open

[BUG] Syntax highlighting #32

YummYume opened this issue Oct 18, 2023 · 8 comments

Comments

@YummYume
Copy link

Hello! I noticed a few bugs with syntax highlighting while using this extension in a pretty big project and thought I should share them here.

The first one is more of an annoyance than anything, as it only breaks one line (and not the rest of the file) :

{{ form_start(form, {attr: {class: 'flex flex-col gap-1'}}) }}

image

The highlighting most likely breaks because of the double }} without spacing, if I put } } instead then it works just fine.

This second case is a bit more annoying though.

{% set title = 'Yam\'s shopping list' %}

<h2>HTML is broken from here</h2>

image

This breaks all the markup after escaping the string. I'm pretty sure this is the same issue as #31.

@ItsFrankieD
Copy link

ItsFrankieD commented Oct 19, 2023

I can confirm that the second issue matches mine.

If I may, I would like to mention another syntax highlighting issue.

Twig markup within an attribute does not benefit from any sort of syntax highlighting,

<a href="{{ url }}"></a>

image

In addition to this, using quotes that match the outer quotes of an attribute within Twig markup also breaks any following HTML markup.

<a href="{{ "<front>"|render }}"></a>

image

This is shaping up to be a general quoting issues—not just an escaped quotes issue.

@YummYume
Copy link
Author

I definitely have the same issue with the double quotes, but for me the twig markup within an attribute seems to work alright? At least I can differentiate the two.

Quick test results :

image

@kaermorchen
Copy link
Owner

Hello guys.

Thank all for your issues. I have tried to fix it in new release. Not all bugs left. I will try one more time later.

@ItsFrankieD
Copy link

Glad to hear it. Thanks for putting the time in! Having used most of the Twig extensions on the market, I can say that this has been the most reliable Twig-related extension as of late.

@Zekfad
Copy link

Zekfad commented Nov 11, 2024

Have the same issue as in #32 (comment)

using quotes that match the outer quotes of an attribute within Twig markup also breaks any following HTML markup.

image

@ItsFrankieD
Copy link

@Zekfad I believe this project has been abandoned. I haven't seen any movement in over a year. Since then I've made the switch to the TWIG Pack extension, and it's a good alternative.

@kaermorchen
Copy link
Owner

Sorry guys, I have a lot of work in main job

@ItsFrankieD
Copy link

No worries! My apologies for jumping to the conclusion that you'd abandoned the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants