Stillat / vscode-antlers-language-server

Provides rich language features for Statamic's Antlers templating language, including code completions, syntax highlighting, and more.
https://antlers.dev
MIT License
36 stars 3 forks source link

Antlers tags get corrupted on save #58

Closed stefankempf closed 1 year ago

stefankempf commented 1 year ago

Describe the bug Probably similar issue like #54

I have the following snippet:

<div
    class="absolute right-0 h-[3px] bg-orange-300"
    style="
        {{ horizontal_stripe_position }}: 0px;
        width: {{ horizontal_stripe_length }}px;
        translate: {{ horizontal_stripe_indention }}px 0;
    "></div>

When I save my file, it gets automatically rewritten into:

<div
    class="absolute right-0 h-[3px] bg-orange-300"
    style="
        <a8hyditndgz0ge1c3lcydrjrajajm14na/>: 0px;
        width: {{ horizontal_stripe_length }}px;
        translate: {{ horizontal_stripe_indention }}px 0;
    "></div>

Impacted Products Which Antlers Toolbox products does this bug apply to?

Versions and Other Plugins/Extensions

"prettier-plugin-antlers": "^1.1.20",
"prettier-plugin-tailwindcss": "^0.2.1",

Additional context Full Partial:

{{#
    @name Teaser
    @desc Renders teasers on home and projects
#}}
<div class="col-span-full grid grid-cols-12 border-y-setzkasten">
    {{ if index % 2 == 0 }}
        <div class="hidden border-r-setzkasten sm:block"></div>
    {{ /if }}
    <div
        class="{{ if index % 2 != 0 }}
                sm:border-r-setzkasten col-start-1 sm:col-end-12 grid-cols-[1fr_2fr]
            {{ else }}
                grid-cols-[2fr_1fr] sm:col-start-2 col-end-13
            {{ /if }} col-span-full gap-24 bg-green-100 sm:grid sm:px-28 sm:py-16">
        <div class="grid shrink-0 place-content-center">
            <div class="relative">
                {{ svg src="alphabet/{letter:key}.svg" class="fill-yellow-100 bg-orange-200 w-52" }}
                <div
                    class="absolute right-0 h-[3px] bg-orange-300"
                    style="
                        {{ horizontal_stripe_position }}: 0px;
                        width: {{ horizontal_stripe_length }}px;
                        translate: {{ horizontal_stripe_indention }}px 0;
                    "></div>
                <div
                    class="absolute top-0 right-0 h-[300px] w-[3px] bg-orange-300"></div>
                {{ partial:snippets/teaserimage class="max-w-sm max-h-72 absolute top-0 -right-[50%]" }}
            </div>
        </div>
        <div class="{{ if index % 2 != 0 }}sm:order-first{{ /if }} shrink-0">
            <h2 class="text-5xl">
                {{ title }}
            </h2>
            <p class="text-[1.4375rem] leading-[2.228125rem]">
                {{ teaser_text }}
            </p>
        </div>
    </div>
</div>
JohnathonKoster commented 1 year ago

Resolved in: