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

Latte highlighting bug #2592

Open
RunDevelopment opened this issue Oct 14, 2020 · 3 comments
Open

Latte highlighting bug #2592

RunDevelopment opened this issue Oct 14, 2020 · 3 comments

Comments

@RunDevelopment
Copy link
Member

Description
As discussed here, after some improvements to PHP, Latte no longer passes its tests. This is because Latte-type call expressions are highlighted with PHP.

Example
Latte tests.

<a n:href="Post:show $post->id">link</a>
@RunDevelopment
Copy link
Member Author

@dg Can you help with this? A link to a detailed explanation of this syntax would be enough for me to fix it.

@dg
Copy link
Contributor

dg commented Oct 14, 2020

In Latte is in some cases possible to omit quotation marks around strings, specifically it is the case of first characters before [\s,], ie. Post:show. So it is string.

But despite that, the syntax highlighting looks visually better when it's not taken as a string, ie. https://doc.nette.org/en/3.0/creating-links#toc-in-the-presenter-template, so I think that these changes are ok 2f0b21e#diff-7341ff08c4d814cbbb6e99cffe0347a2a53a5a683d498514358f5ebb34c732ec

@RunDevelopment
Copy link
Member Author

Thank you for the explanation.

#2591 will change the highlighting again, so I'll look for a solution after that. You're definitely right that it looks better not being a string, so I'll take that into account.

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

No branches or pull requests

2 participants