Sha256: eb9e77c96145c48f2ec530b2876f3c0628a058f1c031fcc72ae61c798693bb2c

Contents?: true

Size: 306 Bytes

Versions: 38

Compression:

Stored size: 306 Bytes

Contents

module Account::MarkdownHelper
  def markdown(string)
    Commonmarker.to_html(string, options: {
      extensions: {header_ids: true},
      plugins: {syntax_highlighter: {theme: "InspiredGitHub"}},
      render: {width: 120, unsafe: true}
    }).gsub(/&lt;(\/)?script/, '<\\1script').html_safe
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
bullet_train-1.11.0 app/helpers/account/markdown_helper.rb
bullet_train-1.10.0 app/helpers/account/markdown_helper.rb
bullet_train-1.9.0 app/helpers/account/markdown_helper.rb
bullet_train-1.8.5 app/helpers/account/markdown_helper.rb
bullet_train-1.8.4 app/helpers/account/markdown_helper.rb
bullet_train-1.8.3 app/helpers/account/markdown_helper.rb
bullet_train-1.8.2 app/helpers/account/markdown_helper.rb
bullet_train-1.8.1 app/helpers/account/markdown_helper.rb
bullet_train-1.8.0 app/helpers/account/markdown_helper.rb
bullet_train-1.7.23 app/helpers/account/markdown_helper.rb
bullet_train-1.7.22 app/helpers/account/markdown_helper.rb
bullet_train-1.7.21 app/helpers/account/markdown_helper.rb
bullet_train-1.7.20 app/helpers/account/markdown_helper.rb
bullet_train-1.7.19 app/helpers/account/markdown_helper.rb
bullet_train-1.7.18 app/helpers/account/markdown_helper.rb
bullet_train-1.7.17 app/helpers/account/markdown_helper.rb
bullet_train-1.7.16 app/helpers/account/markdown_helper.rb
bullet_train-1.7.15 app/helpers/account/markdown_helper.rb
bullet_train-1.7.14 app/helpers/account/markdown_helper.rb
bullet_train-1.7.13 app/helpers/account/markdown_helper.rb