* Handlebars: Default --html-whitespace-sensitivity to strict
* Record tests other than handlebars
* Trim trailing newlines
* Record tests
* Fix rebase
* Record all tests not only hbs
* Fix the idempotency issue
Adjust dedent for the last child node
* Fix the annoying trailing whitespace
* Trim isolated leading newline
* Add a failing test
* Support escaping a mustache with `\`
It is documented in handlebarjs documentation here:
https://handlebarsjs.com/guide/expressions.html#escaping-handlebars-expressions
* Preprocess TextNode to adjust the need of backslashes
Given that template:
```hbs
a non-escaped mustache: \\\{{helper}}
```
Glimmer parser will produce two body nodes:
- a TextNode where `node.chars === "a non-escaped mustache: \\\\"`
- a MustacheStatement for `{{helper}}`
In order to correctly print the input, we need to adjust the TextNode to
`node.chars === "a non-escaped mustache: \\\\\\"`, namely we have to add
a backslash that is removed by Glimmer parser. This is this commit
purpose.
* Add changelog note
* Refactor isVoid to a function
* Move isVoid to utils
* Refactor isVoid function
* Simplify a ternary
* Refactor ElementNode / MustacheStatement
* Rename a function
* Refactor blockstatement
* Extract two functions from ElementNode
* Remove useless filter
* Use helpers in TextNode
* Refactor SubExpression
* Refactor BlockStatement
* Fix cspell CI job
* Update src/language-handlebars/printer-glimmer.js
Co-Authored-By: fisker Cheung <lionkay@gmail.com>
* Fix linting in CI
Co-authored-by: fisker Cheung <lionkay@gmail.com>
* Remove simple-html-tokenizer resolution
* Remove outdated filter
I'm not 100% sure but I guess it was useful with previous
@glimmer/syntax versions
* Remove unused code
* Upgrade @glimmer/syntax and simple-html-tokenizen
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
* Move old handlebars to html file
This kind of handlebars code is supposed to be in html files.
* Remove useless file
* Uglify our old handlebars file
* Move venerable hbs tests to their folder
Because of their config
* html: Use glimmer for script tags of type handlebars
* Record snapshots
* Add CHANGELOG entry
* Add the CHANGELOG test
* Make the PR changes more obvious