You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some investigation it appears to be related to the end of the toMarkdown function, where repeated newlines are collapsed. I'm not sure if that is correct behaviour as in this case it leads to explicit newlines being collapsed but it could be related to the spec?
it appears to be related to the end of the toMarkdown function, where repeated newlines are collapsed.
Yes, correct. Repeated newlines are collapsed to tidy up the converted HTML, but as you have pointed out, this approach fails when processing repeated new lines in pre blocks.
This behaviour is fixed in https://github.com/domchristie/turndown which is a rewrite and will supersede this project. Feel free to give it a go, and raise any issues there.
I have some HTML which looks like this:
and a custom converter like this (using GFM):
The end result looks like this:
Instead of having two or three newlines it only keeps one, despite my filter returning the correct number of newlines between each line.
Am I going wrong somewhere in my code or is this a bug or a known issue...?
The text was updated successfully, but these errors were encountered: