Sha256: 4281d77eff0a9ffaed09123bcf0b1a0760212c5106515b06c797e77db6e7d2b8
Contents?: true
Size: 401 Bytes
Versions: 52
Compression:
Stored size: 401 Bytes
Contents
module Account::MarkdownHelper def markdown(string) if defined?(Commonmarker.to_html) Commonmarker.to_html(string, options: { extensions: {header_ids: true}, plugins: {syntax_highlighter: {theme: "InspiredGitHub"}}, render: {width: 120, unsafe: true} }).html_safe else CommonMarker.render_html(string, :UNSAFE, [:table]).html_safe end end end
Version data entries
52 entries across 52 versions & 1 rubygems