Stillat / blade-parser-typescript

A Laravel Blade parser, compiler, and static analyzer written in TypeScript.
https://stillat.com
MIT License
82 stars 2 forks source link

It adds extra space inside class attribute when using @error directive #103

Closed imre-iglu closed 3 months ago

imre-iglu commented 3 months ago

I would first like to thank plugin author for creating this amazing prettier package. It's best one I have used.

I saw that it adds two spaces after the @error() directive, when using inside the class attribute.

It turns this HTML:

<input type="text" class="my-class @error('form.title') has-error @enderror" />

Into this:

<input type="text" class="my-class @error('form.title')  has-error @enderror"/>

My .blade.format.json looks like this:

{
    "useLaravelPint": false,
    "spacesAfterDirective": 0,
    "spacesAfterControlDirective": 0,
    "phpOptions": {
        "singleQuote": true,
        "phpVersion": "8.1"
    },
    "attributeJsOptions": {
        "semi": true,
        "printWidth": 120
    }
}
JohnathonKoster commented 3 months ago

Thanks for the report! I'll take a look this upcoming weekend

JohnathonKoster commented 3 months ago

Fix released in v2.1.14