Sha256: 9172c11cac427bb8add8d9fd1bb45bdee2614e27090ab0b31754b5fb9a99cd99

Contents?: true

Size: 361 Bytes

Versions: 15

Compression:

Stored size: 361 Bytes

Contents

module Account::MarkdownHelper
  def markdown(string)
    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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bullet_train-1.3.14 app/helpers/account/markdown_helper.rb
bullet_train-1.3.13 app/helpers/account/markdown_helper.rb
bullet_train-1.3.12 app/helpers/account/markdown_helper.rb
bullet_train-1.3.11 app/helpers/account/markdown_helper.rb
bullet_train-1.3.10 app/helpers/account/markdown_helper.rb
bullet_train-1.3.9 app/helpers/account/markdown_helper.rb
bullet_train-1.3.8 app/helpers/account/markdown_helper.rb
bullet_train-1.3.7 app/helpers/account/markdown_helper.rb
bullet_train-1.3.6 app/helpers/account/markdown_helper.rb
bullet_train-1.3.5 app/helpers/account/markdown_helper.rb
bullet_train-1.3.4 app/helpers/account/markdown_helper.rb
bullet_train-1.3.3 app/helpers/account/markdown_helper.rb
bullet_train-1.3.2 app/helpers/account/markdown_helper.rb
bullet_train-1.3.1 app/helpers/account/markdown_helper.rb
bullet_train-1.3.0 app/helpers/account/markdown_helper.rb