shufo / vscode-blade-formatter

An opinionated Blade file formatter for VSCode

Home Page:https://marketplace.visualstudio.com/items?itemName=shufo.vscode-blade-formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Formatting Bug]: script tag inside code tag converted to <blade ___scripts_0___/>

Muurtaja opened this issue · comments

Platform

Windows

Template before formatting

<pre><code class="language-markup" id="integration-script">
    <script src="#" type="text/javascript"></script>
</code></pre>

Template after formatting

<pre><code class="language-markup" id="integration-script">
    <blade ___scripts_0___/>
</code></pre>

Expected Behaviour

If it is developed for security, there must be a setting to ignore these features.

Relevant log output

No response

Hi @Muurtaja
Thank you for reporting the issue.
It seems to happen when the html alphabetical sorting option is enabled.

I'll fix it soon, thank you.

For temporary workaround, disable Blade Formatter: format Sort HTML Attributes option by setting none.

Found the regression with v0.20.11 so it reverted at v0.20.12.

I suppose to fix at next release.