Skip to content

[Bug] New line added in comment block (and maybe generally when dealing with embedded formats with syntax errors)Β #42

@gabrielcsapo

Description

@gabrielcsapo

🐞 Describe the Bug

When initial saving the following template

/**
 * EditCaptions, a component for editing the captions of a video.
 * @param {Object} videoPlayMetadata - meta data of the video
 * @param {Function} onEditCaptions - function to call and pass edited captions to
 * @param {Function} onEditCancel - function to call if user cancels editing actions
 * Usage:
    <Video$EditCaptions
      @videoPlayMetadata={{@videoPlayMetadata}}
      @onEditCaptions={{this.onEditCaptions}}
      @onEditCancel={{this.onCloseEditCaptionsModal}}
    />
 */
export default class EditCaptions extends Component {}

the following will result

/**
 * EditCaptions, a component for editing the captions of a video.
 * @param {Object} videoPlayMetadata - meta data of the video
 * @param {Function} onEditCaptions - function to call and pass edited captions to
 * @param {Function} onEditCancel - function to call if user cancels editing actions
 * Usage:
    <Video$EditCaptions
      @videoPlayMetadata={{@videoPlayMetadata}}
      @onEditCaptions={{this.onEditCaptions}}
      @onEditCancel={{this.onCloseEditCaptionsModal}}
    />

 */
export default class EditCaptions extends Component {}

It adds a new line after the content block

πŸ”¬ Minimal Reproduction

I am trying to make a reproduction, but it seems to only happen in my environment via the vscode plugin

πŸ˜• Actual Behavior

Adds a new line in comment

πŸ€” Expected Behavior

Do not add a new line in comment block

🌍 Environment

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

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