For markups like Markdown, spaces in output can potentially be significant (e.g. code). Therefore, they should not be stripped. Here is an example test case that shows how it was broken:
Before fix:
> puts PandocRuby.convert("<p><pre><code>line 1\nline 2</code></pre></p>", from: 'html', to: 'markdown')
line 1
line 2
After fix:
> puts PandocRuby.convert("<p><pre><code>line 1\nline 2</code></pre></p>", from: 'html', to: 'markdown')
line 1
line 2
For markups like Markdown, spaces in output can potentially be significant (e.g. code). Therefore, they should not be stripped. Here is an example test case that shows how it was broken:
Before fix:
After fix: