Closed wakairo closed 3 weeks ago
I tested the following code and it seems that the keyword argument "plugins" of Node#to_html does not make an effect on the version 1.1.2.
require 'commonmarker' puts Commonmarker::VERSION # => 1.1.2 code = <<~CODE ```ruby puts "hello"
CODE plugins = { syntax_highlighter: { theme: "InspiredGitHub" } }
p Commonmarker.to_html(code, plugins: plugins)
<span style=\"color:#62a35c;\">puts <span style=\"color:#183691;\">"hello"\n
doc = Commonmarker.parse(code) p doc.to_html(plugins: plugins)
puts "hello"\n
p doc.to_html
Thank you for the report! I haven't had time to look into this but I will soon.
I tested the following code and it seems that the keyword argument "plugins" of Node#to_html does not make an effect on the version 1.1.2.
CODE plugins = { syntax_highlighter: { theme: "InspiredGitHub" } }
p Commonmarker.to_html(code, plugins: plugins)
=> "<pre lang=\"ruby\" style=\"background-color:#ffffff;\">
<span style=\"color:#62a35c;\">puts <span style=\"color:#183691;\">"hello"\n
\n"doc = Commonmarker.parse(code) p doc.to_html(plugins: plugins)
=> "<pre lang=\"ruby\">
puts "hello"\n
\n"p doc.to_html
=> "<pre lang=\"ruby\">
puts "hello"\n
\n"