haidubogdan / netbeans-php-blade-plugin

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

at netbeans 12.6, code formating has some errors #4

Closed rfrkk closed 6 months ago

rfrkk commented 2 years ago

erre1. Format of html was running away, bringing more and more spacing. ex1:

not format yet : <div class="logout"><a href={{url("/logout")}}> logout </a></div>
format once:  <div class="logout"><a href={{url("/logout")}}      > logout </a></div>
format twice:  <div class="logout"><a href={{url("/logout")}}              > logout </a></div>

.... ex2:

not format yet : <li><?= $content->date_create ?>></li>
format once:  <li><?= $content->date_create ?>     ></li>
format twice: <li><?= $content->date_create ?>              ></li>

error2. netbeans display syntax error ex1: @section({{ $content }})

haidubogdan commented 2 years ago

HI, Thank you for the notices. The formatting had been a blocking issue so far, but I think I've started to overcome some of them. I think the formatting should be more stable now with the latest commit https://github.com/haidubogdan/netbeans-php-blade-plugin/releases I will address the error2 issue soon.

haidubogdan commented 2 years ago

Trying to render a blade template with @section({{ $content }}) will throw an exception on older version of blade templating : "Parse error: syntax error, unexpected '<'" So I think I can keep the display syntax error until a blade versioning is implemented.

wimurk commented 6 months ago

Edit I am on Netbeans 21

Maybe an old issue but with the but with the latest update starting from 2.0.3 the formatting for custom components is also broken.

Not formatted: image

After formatting: image

haidubogdan commented 6 months ago

It is possible that it is a html embedding issue also. <style> and <script> indentation is broken also.

haidubogdan commented 6 months ago

I close this issue as it should be more or less fixed, and now there are more nuanced issues. The coloring should also be fixed for blade code inside component tags.

I will create an active issue regarding indentation for components :

https://github.com/haidubogdan/netbeans-php-blade-plugin/issues/44