gollum
gollum copied to clipboard
Using pandoc-ruby escapes double backslash
Describe the bug
A double backslash \\
is escaped when using pandoc-ruby as the markdown renderer.
To Reproduce
$$a \\ b$$
produces ab
with environment
Gollum 5.2.3
Running on: x86_64-linux-gnu with Ruby version 2.7.0
Using:
rugged 1.1.1
gollum-rugged_adapter 1.1.1
gollum-lib 5.1.3
Markdown rendering gem: pandoc-ruby
Other renderering gems:
none
Expected behavior Should instead produce
a
b
as it does with environment
Gollum 5.2.3
Running on: x86_64-linux-gnu with Ruby version 2.7.0
Using:
rugged 1.1.1
gollum-rugged_adapter 1.1.1
gollum-lib 5.1.3
Markdown rendering gem: kramdown
Other renderering gems:
none
I haven't had time to dig into this yet.
One thing we should verify and document here is whether pandoc-ruby
renders this $$a \\ b$$
the way we expect it to outside of the context of Gollum. This will help us be confident that it's indeed a bug in Gollum.
From irb
:
2.6.3 :005 > PandocRuby.new('$$a \\ b$$').to_html
=> "<p><span class=\"math display\"><em>a</em> <em>b</em></span></p>\n"
So I think this is no gollum bug?
...although we invoke PandocRuby
in a slightly different way. Strangely, mimicking that call doesn't reproduce the expected ab
, but it also doesn't render the \\
as a newline:
2.6.3 :028 > PandocRuby.convert("Test $$a \\ b$$ foo", '--citeproc', :from => 'markdown-tex_math_dollars-raw_tex', :to => :html)
=> "<p>Test $$a b$$ foo</p>\n"
When I enter $$a \\ b$$
in the MathJax demo here I get the same result as in gollum (i.e. ab
), so I'll close this as not a bug. Feel free to reopen if I'm missing something here.