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

Version Path
bullet_train-1.6.25 app/helpers/account/markdown_helper.rb
bullet_train-1.6.24 app/helpers/account/markdown_helper.rb
bullet_train-1.6.23 app/helpers/account/markdown_helper.rb
bullet_train-1.6.22 app/helpers/account/markdown_helper.rb
bullet_train-1.6.21 app/helpers/account/markdown_helper.rb
bullet_train-1.6.20 app/helpers/account/markdown_helper.rb
bullet_train-1.6.19 app/helpers/account/markdown_helper.rb
bullet_train-1.6.18 app/helpers/account/markdown_helper.rb
bullet_train-1.6.17 app/helpers/account/markdown_helper.rb
bullet_train-1.6.16 app/helpers/account/markdown_helper.rb
bullet_train-1.6.15 app/helpers/account/markdown_helper.rb
bullet_train-1.6.14 app/helpers/account/markdown_helper.rb
bullet_train-1.6.13 app/helpers/account/markdown_helper.rb
bullet_train-1.6.12 app/helpers/account/markdown_helper.rb
bullet_train-1.6.11 app/helpers/account/markdown_helper.rb
bullet_train-1.6.10 app/helpers/account/markdown_helper.rb
bullet_train-1.6.9 app/helpers/account/markdown_helper.rb
bullet_train-1.6.8 app/helpers/account/markdown_helper.rb
bullet_train-1.6.7 app/helpers/account/markdown_helper.rb
bullet_train-1.6.6 app/helpers/account/markdown_helper.rb