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

Links without text should be discarded #96

Open
bilogic opened this issue May 14, 2022 · 0 comments
Open

Links without text should be discarded #96

bilogic opened this issue May 14, 2022 · 0 comments

Comments

@bilogic
Copy link

bilogic commented May 14, 2022

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

  1. [](http://a.com)[](http://b.com)
  2. Totally empty
  3. http://a.com http://b.com , additional space after each link
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

No branches or pull requests

1 participant