Repository is archived
No commit activity in last 3 years
No release in over 3 years
Minidown is a lightweight & fast markdown parser, with complete GFM support.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
 Project Readme

Minidown

Gem Version Build Status

Minidown is yet another markdown parser, with:

  • Complete GFM support.

  • Lightweight, no other dependencies.

  • Fast & easy to use.

Project Deprecated !!!

Please use kramdown instead https://github.com/gettalong/kramdown

Installation

Add this line to your application's Gemfile:

gem 'minidown'

And then execute:

$ bundle

Or install it yourself as:

$ gem install minidown

Basic usage

require 'minidown'

Minidown.render('*hello*')
#=> "<p><em>hello</em></p>"

Custom your own handler

highlight_with_pygments = ->(lang, content) {
  Pygments.highlight(content, :lexer => lang)
}

Minidown.render source, code_block_handler: highlight_with_pygments

# if you don't like pass options every time
parser_with_highlight = Minidown::Parser.new code_block_handler: highlight_with_pygments
parser_with_highlight.render source

Command line

wget https://raw.github.com/mojombo/github-flavored-markdown/gh-pages/_site/sample_content.md
minidown sample_content.md > result.html
open result.html

looks nice!

Syntax

Complete GFM(GitHub Flavored Markdown) support. include Basic markdown, Task list, Table, Code, Blockquote etc.. view details

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request