Skip to content

Conversation

@Rich-Harris
Copy link
Member

One of the oldest issues — #3. In situations where an if-block or each-block is immediately followed by a DOM node (element, text, or [raw] mustache tag), there's no need to create a comment just to anchor the block to the right location in the DOM; we can just use the following element. The same is true if the block is the last thing inside an element.

Now that we're doing two passes over the markup AST this is reasonably straightforward — we just need to give each DOM node a name in advance, so that on the second pass an if-block or each-block can easily determine whether or not it needs to create a comment node.

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