html-to-md
html-to-md copied to clipboard
Deleting spaces
There's an edge case wherein the library can produce markdown lacking spaces, thus joining words, which is rarely intended behavior.
E.g., this:
This was a <b>good </b>year.
Outputs this:
This was a **good**year.
I've managed to fix this by preprocessing html with a simple, deterministic regular expression:
htmlString,replace(/(\x20)((?:<\/\w+>)+)(\S)/g,'$2$1$3')
That said, doing so might be outside the scope of this project. So, I'm basically just opening this issue to ask if you're accepting pull requests of this sort. Cheers!
@dddominikk I will try to solve it within the scope of project recently, thanks for the report and suggestion!