diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 6622236d8fe3..ac9339ff5b26 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -80,3 +80,37 @@ Examples: var x = (await foo.bar.blah)?.hi; } ``` + +- Handlebars: Fix {{else}}{{#if}} into {{else if}} merging ([#6080] by [@dcyriller]) + + + ``` + // Input + {{#if a}} + a + {{else}} + {{#if c}} + c + {{/if}} + e + {{/if}} + + // Output (Prettier stable) + {{#if a}} + a + {{else if c}} + c + e + {{/if}} + + // Output (Prettier master) + Code Sample + {{#if a}} + a + {{else}} + {{#if c}} + c + {{/if}} + e + {{/if}} + ```