Skip to content

Conversation

@mattcoley
Copy link
Collaborator

@mattcoley mattcoley commented Feb 17, 2021

Whitespace controls operate on the assumption that textnodes cannot be adjacent. You can break up text nodes with a comment node \n {# comment #} \n. This should not affect the whitespace control but it does under the current code. In order to solve for this I merged adjacent text nodes. I did try a few other approaches over a couple of hours to try to get the same effect but could not solve for the case where there are more than 2 text nodes stacked next to each other.

@mattcoley mattcoley requested a review from jasmith-hs February 17, 2021 05:25
Copy link
Contributor

@jasmith-hs jasmith-hs left a comment

Choose a reason for hiding this comment

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

This seems like a good solution. We essentially want the adjacent text tokens to be treated as the same token when handling whitespace, so merging them makes sense.

@mattcoley mattcoley merged commit 5474786 into master Feb 17, 2021
@mattcoley mattcoley deleted the fix-whitespace-breakup branch February 17, 2021 13:59
@jasmith-hs jasmith-hs mentioned this pull request Oct 30, 2023
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.

3 participants