Fail to parse html `a` link with preceding content
Closed this issue · 4 comments
Tested on 1.4, 1.5, and master branches for both earmark
and earmark_parser
getting the same result:
iex> Earmark.as_html!("reading <a href=\"http://amzn.com/1592535879\">The Universal Principles of Design</a>")
"<p>\nreading <a href=”<a href=\"http://amzn.com/1592535879%22\">http://amzn.com/1592535879”</a>>The Universal Principles of Design</a></p>\n"
Is that format expected? If so, how can I help fixing it?
HTML tags are only supported when starting a line and behavior for the rest of the line is undefined.
Maybe the docs could be clearer on that.
Hi @RobertDober thanks for feedback
HTML tags are only supported when starting a line and behavior for the rest of the line is undefined.
Maybe the docs could be clearer on that.
@RobertDober Ran into the same problem and did not understand why this issue was closed. Does it mean, that links with preceding content are not supported by EarmarkParser
? If so, are there plans to support it in the future?
Example string
Hello <a target="_blank" href="https://example.com">Example</a>
Expected Result
Actual Result (notice that the link breaks)
This has been planned for EarmarkParser 1.5 for a long time, unfortunately I have barely time to maintain 1.4.x
:(
Should update the docs