Skip to content

fix: prevent handlebars helpers from triggering HTML optional end tag… - #2436

Closed
SarthakDudhe wants to merge 3 commits into
beautifier:mainfrom
SarthakDudhe:fix/handlebars-tr-indentation-2045
Closed

fix: prevent handlebars helpers from triggering HTML optional end tag…#2436
SarthakDudhe wants to merge 3 commits into
beautifier:mainfrom
SarthakDudhe:fix/handlebars-tr-indentation-2045

Conversation

@SarthakDudhe

Copy link
Copy Markdown

Summary: Fixes #2045. Prevents Handlebars helpers (like {{#tr}}) from being incorrectly treated as HTML tags.

Changes: Updated _do_optional_end_element in beautifier.js to ensure HTML-specific tag omission rules only trigger for tags starting with <. This prevents templating helpers from accidentally "popping" the tag stack and breaking indentation.

Testing: Verified that {{#tr}} now maintains correct indentation inside . All 11,904 existing HTML tests passed.

@bitwiseman

bitwiseman commented Jun 20, 2026

Copy link
Copy Markdown
Member

Testing: Verified that {{#tr}} now maintains correct indentation inside . All 11,904 existing HTML tests passed.

Add an automated test.

@bitwiseman bitwiseman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Waiting for automated test.

@bitwiseman

Copy link
Copy Markdown
Member

@SarthakDudhe
While I appreciate you wanting to contribute, please update your codex settings to follow the contributing guidelines, isolate changes into distinct units (without cross-over), and well formatted descriptions that follow the repo template.

I'm mass-closing your PRs for clarity.

Feel free to reopen individual PRs when you've updated.

@bitwiseman bitwiseman closed this Jul 3, 2026
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.

Handlebars {{#tr}} helper is indented as if it were a <tr> tag

2 participants