Files
test-repo/tests
Cyrille David bff049fd96 handlebars: Support escaping a mustache with a backslash (#8634)
* 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
2020-06-24 23:55:02 +03:00
..
2020-05-28 01:16:52 +08:00
2020-06-23 13:52:50 +03:00
2020-05-28 01:16:52 +08:00
2020-06-23 13:52:50 +03:00
2020-05-09 07:50:34 +08:00
2020-06-17 19:18:29 +08:00