Skip to content

πŸ› BUG: "Unterminated string literal" when breaking class="" into multiple linesΒ #1047

@gersomvg

Description

@gersomvg

What version of @astrojs/compiler are you using?

2.10.3

What package manager are you using?

pnpm

What operating system are you using?

mac

Describe the Bug

Using prettier-plugin-classnames will lead to newlines being inserted into class="". This is valid HTML as far as I know, but Astro won't allow it and throws a Unterminated string literal.

Earlier issue over at the astro repo: withastro/astro#4029

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-yiuhkm?file=src%2Fpages%2Findex.astro

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly improves performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions