Skip to content

lsp: formatting malformed when CSS expressions are too long #733

Closed as not planned
@rverton

Description

@rverton

templ version v0.2.680

The following example templates works fine:

package components

templ test() {
	<a
		href="/"
		class={ "hover:bg-zinc-600 px-1 py-1 -mt-1 rounded flex items-center space-x-2 foo foo foo" , "bar" }
	></a>
}

Now, if there is one more foo added to the list of classes, the LSP formatter seems to malform the template, resulting in the following output:

package components

templ test() {
<a href="/indexer" class={ "hover:bg-zinc-600 px-1 py-1 -mt-1 rounded flex items-center space-x-2 foo foo foo foo"
    , "bar" }></a>
}

This results in an error: string expression attribute: missing closing brace: line 3, col 27 []

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions