Skip to content

[Bug] With invalid hbs, prettier will transform <template> in source code #43

@simonihmig

Description

@simonihmig

🐞 Describe the Bug

When hbs inside <template> is invalid, prettier will transform <template> in the source file to its internal representation format (__GLIMMER_TEMPLATE())

🔬 Minimal Reproduction

  1. In a .gts/.gjs test file, create a <template> tag that contains invalid hbs syntax, like this:

image

  1. Run prettier on it

😕 Actual Behavior

image

🤔 Expected Behavior

No reformatting happens, <template> is not transformed.

🌍 Environment

  • prettier-plugin-ember-template-tag version: 0.3.0
  • ember-template-imports version: 3.4.0

➕ Additional Context

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