Closed mborsetti closed 3 years ago
@mborsetti Thanks for taking care of it.
The code looks good to me, however it'd be much better if we could add some documentation on the code changes to understand them, basically "Why" part of the documentation.
@Alir3z4 Sorry I am new to contributing to the project, and the only documentation I see is usage.md
, which is pretty minimal. What do you have in mind? Feel free to edit my PR at will if that's easier.
@Alir3z4 is there anything else you need from me before accepting this PR?
Markdown does not allow for breaks inside link names (between [
and ]
), and they (obviously) break any Markdown to HTML parser such as markdown2 used in my project webchanges, which reconstructs diffed data generated by html2text back into HTML.
Sorry for delayed response.
It's all good, thanks. Could you please resolve the conflict and I'll merge right away.
Thx, merge done
The following HTML code
is being converted by
html2text
version (2020, 1, 16) to the following Markdown (notice in the second example the line break before the closing]
):or with inline_links = False:
The additional line break, besides looking askew, doesn't seem to be allowed by the official specs, and indeed breaks converting Markdown back to HTML.
This PR fixes the code to produce the following correct Markdown:
or with inline_links = False:
Python 3.9 code to replicate the above: