markdown-flavor-maker

1.0.2 • Public • Published

Markdown Flavor Maker

npm status build status dependency status coverage status

Make your own flavor of markdown

This tool allows you to add your own rules to markdown. It is highly inspired by Mistune.

var flayvaMayka = require('markdown-flavor-maker');

// Exposes marked setOptions function.
flayvaMayka.setOptions();

flayvaMayka.bracketize('++', '++', '<span class="drank">','</span>');

flayvaMayka.bracketize('$+', '+$', '<h1 class="grill">','</h1>');

// Outputs <p><strong>This drank.</strong> It's got that <span class="drank">purple</span>.
flayvaMayka.render("**This drank.** It's got that ++purple++"), 

// Outputs <p><strong>This drank tho.</strong> It's got that <strong><span class="drank">purple</span></strong>.
flayvaMayka.render("**This drank.** It's got that **++purple++**"), 

// Outputs <p><span class="grill">This drank tho.</span> It's got that <span class="drank"><strong>purple</strong></span>.
flayvaMayka.render("**This $+drank+$. It's got that ++**purple**++"), 

// Available options
flayvaMayka.addRule.brackets();


@@@@

  @sartaj I think this could be a commenting system. Perhaps we should [define comment](http://en.wikipedia.org/wiki/define)?
  - @kitty Defining comment doesn't matter

@@@@

Readme

Keywords

none

Package Sidebar

Install

npm i markdown-flavor-maker

Weekly Downloads

2

Version

1.0.2

License

Mozilla Public License, version 2.0

Last publish

Collaborators

  • johnnyscript