You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: standalone block stripping for {{#block}} alone on a line
Implement the handlebars 'standalone' stripping rule: when a block
statement or mustache comment is alone on its line (only whitespace
around it from the previous newline to the next newline), strip the
surrounding whitespace.
My implementation is conservative: it trims trailing inline whitespace
from the previous text node (leaving the preceding newline intact), and
consumes the leading newline plus any inline whitespace from the next
text node. This preserves text nodes at body boundaries so downstream
code that expects a specific body indexing pattern still works.
Applies to BlockStatement and MustacheCommentStatement only.
MustacheStatement is not eligible for standalone stripping (matches
legacy behavior).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
0 commit comments