Skip to content

Parsing error with a combination of ternary, function call and type assertion in dynamic Vue class attribute #48

@henribru

Description

@henribru
<span :class="foo ? bar(baz as string) + ' px-1 rounded-md': ''"></span>

Attempting to format this gives "Parsing error: Unexpected token"
and turns it into

<span
  :class="foo ? bar(baz as string) + &quot; rounded-md px-1&quot;: ''"
></span>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions