Properly trim white space of text nodes
Kleissner opened this issue · comments
Line https://github.com/jaytaylor/html2text/blob/master/html2text.go#L340 should use the strings.TrimSpace
function instead of strings.Trim
to properly trim white spaces (especially unicode ones).
data = strings.TrimSpace(spacingRe.ReplaceAllString(node.Data, " "))
Thanks, and sorry about only seeing this now.
I'll gladly accept a PR for this one!
@jaytaylor - I've created PR #34 for this. Let me know how it looks, thanks!
@jaytaylor going to bump this incase it got missed
Hi Mike, thanks for the reminder! Merged it.