html2text
html2text copied to clipboard
Links without text should be discarded
Hi there!
$html = "<a href='http://a.com'></a><a href='http://b.com'></a>";
dd(\Soundasleep\Html2Text::convert($html));
Produces http://a.comhttp://b.com, which produces incorrect HTML if placed through a markdown parser or auto link parser.
I think the output should be one of the following, preferring the ones first mentioned
-
[](http://a.com)[](http://b.com) - Totally empty
-
http://a.com http://b.com, additional space after each link