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

Retain whitespace when parsing pure links #25

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

sionide21
Copy link
Contributor

Fixes #22

@sionide21
Copy link
Contributor Author

While working on this I discovered an issue that may be hiding problems in other tests. It appears that Floki drops whitespace only text nodes.

This means that the spec following spec would have actually passed before this change.

markdown = "**Test**     https://www.google.com"
html = "<p><strong>Test</strong>     <a href=\"https://www.google.com\">https://www.google.com</a></p>\n"
ast      = parse_html(html)
messages = []

assert as_ast(markdown) == {:ok, ast, messages}

@RobertDober
Copy link
Owner

RobertDober commented Aug 21, 2020

Thank you for all of this, not easy to understand my code, unfortunately.

I'll check the Floki issue and rewrite the test accordingly, I shall not accept a false negative!

Oh you fixed that 👏

@RobertDober RobertDober merged commit 2530202 into RobertDober:master Aug 21, 2020
@RobertDober
Copy link
Owner

I have checked it out into a feature branch for the issue at hand, be not alarmed not to find your code in master yet

@sionide21 sionide21 deleted the pure-links-whitespace branch April 14, 2021 20:12
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.

Spaces missing before links
2 participants