Closed AlexanderPruss closed 8 years ago
I forked your project and added a fix. Could you see if we could merge it into the master branch?
@AlexanderPruss hi Alexander, thanks for reporting the issue and your work on it. Please submit a PR, so that the specs can run through. Everything looks fine and valid from my point of view, so it should be possible to merge it ASAP.
That's great to hear! The PR Is up.
The tag_border option can theoretically be used to specify whether tags have a whitespace border or not:
This option doesn't work at the moment, because:
cleaner.tidy(result)
in reverse_markdown.rb happens outside of the config block, so...The bug can be fixed straightforwardly by moving the
cleaner.tidy
call into the config block. I'll add a PR in a bit demonstrating the fix.Justification: Using ReverseMarkdown to parse tricky mixed tags of this form
<a href=\"http://Google.de\"><em><b>Google</b></em><b>.de</b></a>
results in the following output
[_ **Google** _ **.de**](http://Google.de)
The underscore tags aren't parsed correctly by markdown (or by redcarpet) because they're separated from the bold tag by the whitespaces added by the cleaner.