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

Cascading new line breaks when formatting tag #56

Closed sjclark closed 1 year ago

sjclark commented 1 year ago

Describe the bug Additional lines being added to end of antlers tag when using Format on Save

Entirely possible my tag is breaking some sort of syntax rule?

Video Illustrates new lines breaks when saving

https://user-images.githubusercontent.com/4531017/211490999-fbda0281-7d2b-4e53-94a6-88ddb8dd3008.mov

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

Versions and Other Plugins/Extensions

Environment
Application Name: Statamic
Laravel Version: 9.46.0
PHP Version: 8.2.1
Composer Version: 2.2.9
Environment: local
Debug Mode: ENABLED
URL: astronort.test
Maintenance Mode: OFF

Statamic
Addons: 2
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.3.63 Solo
Antlers Toolbox v2.4.4
Prettier v9.10.3
Tailwind CSS IntelliSense v0.9.4

To Reproduce Put this in any file with Format on Save

{{ headings }}
    {{ if attrs:level == 3 || 2
 && !first }}

        <div></div>
    {{ /if }}
{{ /headings }}

Expected behavior Formatting to parse tags correctly.

Additional context Issue can be resolve by adjusting to; {{ if (attrs:level == 3 || 2) && !first }}

JohnathonKoster commented 1 year ago

Resolved in: