If an apostrophe (β) is in a comment, the formatter fails to format
π¬ Minimal Reproduction
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { on } from '@ember/modifier';
interface TestComponentSignature {
Element: HTMLDivElement;
Args: {};
Blocks: {
default: [];
};
}
export default class TestComponent extends Component<TestComponentSignature> {
// Donβt use a real apostrophe or prettier will break
@action
testAction() {
console.log('test action');
}
<template>
<button type="button" {{on "click" this.testAction}}>
{{yield}}
</button>
</template>
}
π Actual Behavior
["ERROR" - 08:43:55] Error formatting document.
["ERROR" - 08:43:55] failed to process all templates, 1 remaining
Error: failed to process all templates, 1 remaining
at convertAst (file:///Users/andrew/dev/bbff/editor/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:70060:11)
at Object.parse (file:///Users/andrew/dev/bbff/editor/node_modules/prettier-plugin-ember-template-tag/dist/prettier-plugin-ember-template-tag.js:70079:5)
at async parse (file:///Users/andrew/dev/bbff/editor/node_modules/prettier/index.mjs:19362:11)
at async coreFormat (file:///Users/andrew/dev/bbff/editor/node_modules/prettier/index.mjs:20683:7)
at async formatWithCursor (file:///Users/andrew/dev/bbff/editor/node_modules/prettier/index.mjs:20885:14)
at async Module.format2 (file:///Users/andrew/dev/bbff/editor/node_modules/prettier/index.mjs:24517:25)
["INFO" - 08:43:55] Formatting completed in 3ms.
π€ Expected Behavior
The document should format
π Environment
prettier-plugin-ember-template-tag version: 2.0.0
ember-template-imports version (if applicable): 3.4.2
content-tag version (if applicable): 1.2.2
eslint-plugin-ember version (if applicable): 11.12.0
π Describe the Bug
If an apostrophe (β) is in a comment, the formatter fails to format
π¬ Minimal Reproduction
π Actual Behavior
π€ Expected Behavior
The document should format
π Environment
β Additional Context
None