Magent specified markdown processor.
Magent specified markdown processor. Inspired by qiita-markdown.
Default processors:
Magnet::Markdown::Filter::Markdown
: convert markdown to htmlMagnet::Markdown::Filter::Sanitize
: whitelist sanitize user markupHTML::Pipeline::Filter::ImageMaxWidthFilter
: link to full size image for large imagesMagnet::Markdown::Filter::Emoji
: covert :emoji: to img elementsAdd this line to your application’s Gemfile:
gem 'magnet-markdown'
And then execute:
$ bundle
Or install it yourself as:
$ gem install magnet-markdown
Magnet::Markdown::Processor
provides markdown rendering:
processor = Magnet::Markdown::Processor.new
processor.call(markdow)
# => {
# output: '<h1>Example</h1> ...'
# }
emoji_root
: base url to link to emoji spriteemoji_path
: url path to link to emoji sprite. :filename
can be used as a placeholder for the sprite file name. If no emoji_path
is set “emoji/:filename” is used.allow_script
: Default false. If set true, Do not remove script
elements.git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)