Repository navigation
Conversation
Four pieces of template syntax inherited from Handlebars, each with a
Prettier auto-fix where one exists and a manual fix:
- template-ampersand-mustache: {{&foo}} -> {{{foo}}} (Prettier fixes it,
except with ~ whitespace control, where it prints invalid syntax)
- template-caret-else: {{^}} -> {{else}} (Prettier fixes it)
- template-inverse-block-with-else: {{^foo}}a{{else}}b{{/foo}} ->
{{#foo}}b{{else}}a{{/foo}} (Prettier fixes it; block parameters on
such a block never worked, and the guide explains the intended form)
- template-raw-block: {{{{foo}}}}...{{{{/foo}}}} -> {{#foo}}...{{/foo}}
with \{{ escapes in the body (Prettier fixes it)
Prettier's behavior was checked with Prettier 2.8.8, 3.0.0, 3.8.3 and
3.9.10, and every before/after pair was parsed with @glimmer/syntax to
confirm it produces the same template.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for ember-deprecations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
11 tasks
driesdl
approved these changes
Oct 20, 2026
|
|
||
| Both render the `code-sample` component with the text `Hello, {{@name}}!` inside a `<p>` in its | ||
| block. Only `{{` needs the backslash: `}}` is ordinary text. A triple curly in the body is escaped | ||
| the same way, as `\{{{`. |
There was a problem hiding this comment.
Does it emit {{{ directly for triple curlies, and does it render correctly since {{ technically only escapes the first two braces?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For proposed RFC emberjs/rfcs#1249
Four pieces of template syntax inherited from Handlebars, each with a Prettier auto-fix where one exists and a manual fix:
{{#foo}}b{{else}}a{{/foo}} (Prettier fixes it; block parameters on such a block never worked, and the guide explains the intended form)