mmd
v4.7.1
Published
Wrapper for Fletcher Penney's MultiMarkdown-4
Downloads
7
Readme
MultiMarkdown for node
Goals
- Expose MultiMarkdown to node.
This addon is usually revisioned in tandem with Fletcher's library.
MultiMarkdown Support for
- ~~Convert to HTML~~
- ~~Convert to ODF~~
- ~~Convert to Text~~
- Convert to Latex (TODO)
- ~~Extract metadata value(s)~~
- ~~Extract metadata key(s)~~
Usage
npm install mmd
var mmd = require('mmd')
var html = mmd.convert('# Look Ma!')
API
This is a low-level, 1-to-1 match of the MultiMarkdown-4 API. As such, there are no convenience methods for metadata, nor any I/O concerns.
mmd.convert(source,[options])
source
{String} The content of the markdownoptions
{Object}return
{String} The converted document
Options
full
{Boolean} Whether to generate a full html document or not. Default isfalse
.format
{String} One of the supported formats (Default ishtml
):- html
- odf
- rtf
- text
- latex (TODO...not supported atm)
mmd.extractMetadataValue(source,key)
source
{String} The content of the markdownkey
{String} The metadata key to returnreturn
{Array} The value(s) mapped to the metadata key.- If the key does not exist, an empty array
[]
is returned.
- If the key does not exist, an empty array
mmd.extractMetadataKeys(source)
source
{String} The content of the markdownreturn
{Array} The keys for any metadata in the document.- If the document does not contain metadata, an empty array
[]
is returned.
- If the document does not contain metadata, an empty array
CHANGELOG
4.7.1
usingnan
and bumped to fletcher's mmd 4.7.1 version4.4.2
initial release with v4.4.2 of MultiMarkdown-4 bindings4.4.3
minor notes