-
Notifications
You must be signed in to change notification settings - Fork 136
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
HTML parsing block (url-encoding tags) #390
Comments
Thank you for reporting this, very nice to track down the exact version, which might indeed be very helpful. That said I cannot reproduce the bug, probably I missunderstood something in the description
Am I missing some context here? |
Here is the behavior in 1.4.5:
Here is the same code in 1.4.4:
|
Oh I see now, thank you for your troubles. Actually this is not a bug, HTML is not recognized unless in its own line, the implementation was too lenient < 1.4.5 I apologise for the earlier lazy implementation, but I am afraid there is not much I can do now w/o introducing a regression against the spec (while the regression you experienced was more of a fix). I completely understand that this is unexpected and even bothersome, but I am afraid there is nothing I can do. |
Thanks for looking into this! But are you sure the spec requires a new line for all HTML elements? John Gruber’s spec specifically says only block-level elements require a new line.
– https://daringfireball.net/projects/markdown/syntax#html And Github has an example that is almost identical to mine in their spec for GFM:
|
Firstly you are correct and secondly you are 100% correct... https://github.com/pragdave/earmark#html-blocks This means that I consider the docs as specs, however it is a moving target and I intend to define how earmark parses HTML in 1.5 please keep updated on that. IIANM this behavior is pretty much what you want, RobertDober/earmark_parser#7 correct? If so I will close this as a doubleton. BTW I hope you understand why I wont touch this in 1.4.* |
Thanks for the clarification. I will stick with.1.4.4 until this has been resolved 👍 |
Hi there, after upgrading from
1.4.1
to1.4.10
, one of my tests started failing. Earmark now seems to have a problem parsing an empty HTML tag.It seems like the bug was introduced in Earmark
1.4.4
;1.4.3
doesn’t exhibit this behavior.<a href="https://example.org/html-link"></a>
was previously correctly parsed (i.e. left untouched).Now
Earmark.as_html
changes it to<a href="https://example.org/html-link%22%3E%3C/a%3E
.The text was updated successfully, but these errors were encountered: