xwmx / pandoc-ruby

Ruby wrapper for Pandoc
MIT License
340 stars 43 forks source link

Don't strip spaces from output of pandoc #5

Closed dkharrat closed 11 years ago

dkharrat commented 11 years ago

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
xwmx commented 11 years ago

Thanks, @dkharrat! This change is in 0.6.1.