Skip to content

Add deprecation guides for legacy Handlebars template syntax - #1442

Draft
ef4 wants to merge 1 commit into
mainfrom
deprecate-legacy-handlebars-syntax
Draft

ef4 wants to merge 1 commit into
mainfrom
deprecate-legacy-handlebars-syntax

Conversation

@ef4

@ef4 ef4 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • 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)

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>
@netlify

netlify Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for ember-deprecations ready!

Name Link
🔨 Latest commit 46ae444
🔍 Latest deploy log https://app.netlify.com/projects/ember-deprecations/deploys/6acf86bfd527b537727073fc
😎 Deploy Preview https://deploy-preview-1442--ember-deprecations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.


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 `\{{{`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants