a grunt wrapper for robotskirt(Sundown) - a C implementation of Markdown
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-sundown --save-dev
In your project's Gruntfile, add a section named
sundown to the data object passed into
gruntinitConfigsundown:options:extensions:fenced_code: truerender_flags:skip_html: truefiles:'output.html': 'input1.md' 'input2.md'
options:extensions:autolink: falsefenced_code: falselax_html_blocks: falseno_intra_emphasis: falsespace_headers: falsestrikethrough: falsetables: falserender_flags:skip_html: falseskip_style: falseskip_images: falseskip_links: falseexpand_tabs: falsesafelink: falsetoc: falsehard_wrap: falseuse_xhtml: falseescape: falseseparator: '\n\n' // concat option for multiple files
extensions - a hash containing the Markdown extensions which the parser will identify. The following extensions are accepted:
no_intra_emphasis: do not parse emphasis inside of words.
Strings such as
foo_bar_baz will not generate
tables: parse tables, PHP-Markdown style.
fenced_code_blocks: parse fenced code blocks, PHP-Markdown
style. Blocks delimited with 3 or more
~ or backticks will be considered
as code, without the need to be indented. An optional language name may
be added at the end of the opening fence for the code block.
autolink: parse links even when they are not enclosed in
characters. Autolinks for the http, https and ftp protocols will be
automatically detected. Email addresses are also handled, and http
links without protocol, but starting with
disable_indented_code_blocks: do not parse usual markdown
code blocks. Markdown converts text with four spaces at
the front of each line to code blocks. This options
prevents it from doing so. Recommended to use
strikethrough: parse strikethrough, PHP-Markdown style
~ characters mark the start of a strikethrough,
this is ~~good~~ bad.
lax_spacing: HTML blocks do not require to be surrounded by an
empty line as in the Markdown standard.
space_after_headers: A space is always required between the hash
at the beginning of a header and its name, e.g.
#this is my header
would not be a valid header.
superscript: parse superscripts after the
^ character; contiguous superscripts
are nested together, and complex values can be enclosed in parenthesis, e.g.
this is the 2^(nd) time.
underline: parse underscored emphasis as underlines.
This is _underlined_ but this is still *italic*.
highlight: parse highlights.
This is ==highlighted==. It looks like this:
quote: parse quotes.
This is a "quote". It looks like this:
footnotes: parse footnotes, PHP-Markdown style. A footnote works very much
like a reference-style link: it consists of a marker next to the text (e.g.
This is a sentence.[^1]) and a footnote definition on its own line anywhere
within the document (e.g.
[^1]: This is a footnote.).
The following HTML flags are available:
skip_html: do not allow any user-inputted HTML in the output.
skip_images: do not generate any
skip_links: do not generate any
skip_styles: do not generate any
safelink: only generate links for protocols which are considered
toc: add HTML anchors to each header in the output HTML,
to allow linking to each section.
hard_wrap: insert HTML
<br> tags inside on paragraphs where the origin
Markdown document had newlines (by default, Markdown ignores these newlines).
use_xhtml: output XHTML-conformant tags. This option is always enabled in the