Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for issue #369 #460

Closed
wants to merge 4 commits into from
Closed

Conversation

jvanasco
Copy link
Contributor

This is an attempt at #369. I am not particularly happy with it, but I could not figure out a better way to handle this. The start/end tokens are already collapsed by the time we get to any of the sections I would feel more comfortable handling this in. More tests are needed, but i'll defer that to others.

Changes:

  • HTML_TAGS__BLOCK_LEVEL contains the list of block level elements
  • InputStreamWithMemory now tracks the last emitted token, because...
  • InputStreamWithMemory emits a SPACE instead of no-space if the following conditions are met:
  1. We have already emitted a token; this guards against a leading space.
  2. We are a START token; this guards against a trailing space.
  3. The last emitted token did not end in a space; this guards against double spaces.

@jvanasco
Copy link
Contributor Author

closing this because I found some edge cases on a larger test suite. will fix and refile.

@jvanasco jvanasco closed this Jul 12, 2019
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.

None yet

1 participant