haidubogdan / netbeans-php-blade-plugin

Netbeans 18+ module plugin for php blade template files
Apache License 2.0
26 stars 4 forks source link

Blade echo breaks html highlight on ternary operator #66

Closed angeljqv closed 1 month ago

angeljqv commented 1 month ago

Hi, this seems like a highlight bug

image

<select>
    <option {{ $MyFlag?"disabled=''":'' }}>My Option</option>
</select>
<div>My Html</div>
<input type="text" />

Great plugin by the way

haidubogdan commented 1 month ago

Thanks for the feedback :) . "Unfortunately" I can't reproduce it with my latest release version https://github.com/haidubogdan/netbeans-php-blade-plugin/releases/tag/nbpr1.0.8 [2.5.0.0] .

I've added the new version on netbeans plugin repository, and I hope that in two or three weeks it will be validated.

https://plugins.netbeans.apache.org/catalogue/?id=100

image

haidubogdan commented 1 month ago

ok I will see with netbeans 21. Maybe it's also a case of carriage return "\r\n"

haidubogdan commented 1 month ago

I reproduced it by adding I will see what can be done.

haidubogdan commented 1 month ago

To adjust for the moment I see that adding spaces between "?" will bypass the bug.

<select>
    <option {{ $MyFlag ? "disabled=''":'' }}>My Option</option>
</select>
<div>My Html</div>
<input type="text" />
angeljqv commented 1 month ago

I see that adding spaces between "?" will bypass the bug.

I already knew that, but that wouldn't be the point

Other ways, like exchanging the type of quotes image

haidubogdan commented 1 month ago

I've prepared a fix in a prerelease https://github.com/haidubogdan/netbeans-php-blade-plugin/releases/tag/prenbpr1.0.8

I will need some time to test it.

angeljqv commented 1 month ago

thank you 👍👍