prettier
2c689f3e - fix(printer-glimmer): preserve path literal segments (#15605)

Commit
2 years ago
fix(printer-glimmer): preserve path literal segments (#15605) * fix(glimmer): preserve path literal segments This change fixes scenarios where an input handlebars file containing literal segments would be reformatted to unwrap the literal segments, causing syntax errors in the resulting output. An example of this is below: ``` <!-- wrong: input.funky<api!response --> {{input.[funky<api!response]}} <!-- wrong: input.this one has spaces --> {{input.[this one has spaces]}} ``` This also handles a scenario where the input contained deprecated '/' delimited paths, ensuring that those paths are not wrapped with brackets. This exists to prevent breaking an existing test `sub-expressions.hbs`. Handling it this way does lead to some minor ambiguity since glimmer does not support these paths, but the ambiguity is probably better than breaking them entirely. fixes #14207, preventing removal of brackets where necessary --------- Co-authored-by: fisker <lionkay@gmail.com>
Author
Parents
Loading