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

PHP - Latte templates plugin - Wrong escaping string parameter (syntax highlight) #5862

Closed
zeleznypa opened this issue Apr 21, 2023 · 3 comments · Fixed by #5886
Closed

PHP - Latte templates plugin - Wrong escaping string parameter (syntax highlight) #5862

zeleznypa opened this issue Apr 21, 2023 · 3 comments · Fixed by #5886
Assignees
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Milestone

Comments

@zeleznypa
Copy link

zeleznypa commented Apr 21, 2023

Apache NetBeans version

Apache NetBeans 17

What happened

Netbeans plugin for latte syntax show an error when the string parameter contains an escaped apostrof character.

Snímek obrazovky 2023-04-21 v 8 12 03

How to reproduce

In the PHP Netbeans enable / install the built-in plugin (tools > plugins > installed > Latte templates)

Snímek obrazovky 2023-04-21 v 8 15 05

Create new file test.latte and put the following code

<p>{_'text that contains an escaped \' character'}</p>

<p>{_'text that not contains an escaped problematic character'}</p>

Did this work correctly in an earlier version?

No / Don't know

Operating System

Mac OS X version 10.16 running on x86_64; UTF-8; cs_CZ (nb)

JDK

14.0.2; Java HotSpot(TM) 64-Bit Server VM 14.0.2+12-46

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

I want to, but I'm not a Java developer

@zeleznypa zeleznypa added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Apr 21, 2023
@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Apr 22, 2023
@junichi11
Copy link
Member

Reproducible. Thanks for reporting it.

@junichi11 junichi11 removed the needs:triage Requires attention from one of the committers label Apr 24, 2023
@junichi11
Copy link
Member

junichi11 commented Apr 24, 2023

Documentation: https://latte.nette.org/en/tags#toc-translation
Latte version 3

@junichi11 junichi11 self-assigned this Apr 24, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Apr 25, 2023
…ache#5862

- apache#5862
- https://latte.nette.org/en/tags#toc-translation
- Fix the lexer (Fix the regex for the single quote string)
- Fix the braces matcher
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Apr 25, 2023
…ache#5862

- apache#5862
- https://latte.nette.org/en/tags#toc-translation
- Fix the lexer (Fix the regex for the single quote string)
- Fix the braces matcher
- Add unit tests
@junichi11 junichi11 added this to the NB18 milestone Apr 25, 2023
neilcsmith-net added a commit that referenced this issue Apr 25, 2023
…le-quote

Fix the error when a single quote is escaped in the Latte template #5862
@zeleznypa
Copy link
Author

@junichi11 Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants