Sha256: eb9e77c96145c48f2ec530b2876f3c0628a058f1c031fcc72ae61c798693bb2c

Contents?: true

Size: 306 Bytes

Versions: 50

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

50 entries across 50 versions & 1 rubygems

Version Path
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
bullet_train-1.7.12 app/helpers/account/markdown_helper.rb
bullet_train-1.7.11 app/helpers/account/markdown_helper.rb
bullet_train-1.7.10 app/helpers/account/markdown_helper.rb
bullet_train-1.7.9 app/helpers/account/markdown_helper.rb
bullet_train-1.7.3 app/helpers/account/markdown_helper.rb
bullet_train-1.7.2 app/helpers/account/markdown_helper.rb
bullet_train-1.7.1 app/helpers/account/markdown_helper.rb
bullet_train-1.7.0 app/helpers/account/markdown_helper.rb