app/helpers/account/markdown_helper.rb in bullet_train-1.2.27 vs app/helpers/account/markdown_helper.rb in bullet_train-1.3.0

- old
+ new

@@ -1,5 +1,12 @@ module Account::MarkdownHelper def markdown(string) - CommonMarker.render_html(string, :UNSAFE, [:table]).html_safe + if defined?(Commonmarker.to_html) + Commonmarker.to_html(string, options: { + plugins: {syntax_highlighter: {theme: "InspiredGitHub"}}, + render: {width: 120, unsafe: true} + }).html_safe + else + CommonMarker.render_html(string, :UNSAFE, [:table]).html_safe + end end end