Node.js - markdown-extra
Some extra methods for parsing markdown.
Why?
I needed some markdown parsing methods for other modules.
Installation
npm install markdown-extra
Example
Take a markdown file and retrieve some info from it:
<!--author: JP Richardsonpublish: 2012-03-04tags: war, historyanything: can write anything--> The Fall of the Roman Empire============================ **Julius Ceasar** was...
heading(markdown) / title(markdown)
Get its heading or title...
var mde = ;var title = mde;console; //The Fall of the Roman Empire
content(markdown)
Get its content ...
var mde = ;var meta = mdecontentmymarkdown; console;
outputs...
The Fall of the Roman Empire============================ **Julius Ceasar** was...
metadata(markdown, [parser])
Get its metadata. Pass in a function for an optional parser.
var mde = ;var meta = mde; console;
outputs...
author: JP Richardson
publish: 2012-03-04
tags: war, history
anything: can write anything
See tests for more usage...
License
(MIT License)
Copyright 2012, JP Richardson jprichardson@gmail.com