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

use list-based processing (inspired by AlextheYounga) #186

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chrispy-snps
Copy link
Collaborator

This pull request does the following:

List comprehensions are used where possible, as they are slightly faster than loop-based accumulation.

Currently, inline whitespace collapsing is implemented ad-hoc across multiple element-specific conversion functions. In the future, perhaps this inline whitespace collapsing could be deferred to a similar code path in process_element(). This would solve a lot of corner cases with nested inline elements that accumulate uncollapsed spaces at their boundaries.

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.

Newlines inside <pre> blocks are collapsed instead of preserved
1 participant