jaytaylor / html2text

Golang HTML to plaintext conversion library
https://jaytaylor.com/html2text
MIT License
541 stars 138 forks source link

Link and period formatting changes #21

Closed gdewald closed 7 years ago

gdewald commented 7 years ago

Changes:

This code is a bit hacky but I thought I'd share it anyways. Feel free to merge either change if you think it would be beneficial.

Input: <div>If you would like to provide feedback please email <a href='mailto:johndoe@example.com'>johndoe@example.com</a>.</div>

Original output: If you would like to provide feedback please email johndoe@example.com (johndoe@example.com) .

New output: If you would like to provide feedback please email johndoe@example.com.

Issues:

  1. Not i18n.
  2. Potential issues with periods in other contexts.
jaytaylor commented 7 years ago

@gdewald I like this very much, thanks for the contribution!

Best, Jay