Markdown 解析器:markdown-it

jopen 9年前

markdown-it 是 Markdown 解析器,100% CommonMark 支持,易扩展,语法插件支持,速度非常快,默认保存。

简单示例
 // node.js, "classic" way:  var MarkdownIt = require('markdown-it'),      md = new MarkdownIt();  var result = md.render('# markdown-it rulezz!');  // node.js, the same, but with sugar:  var md = require('markdown-it')();  var result = md.render('# markdown-it rulezz!');  // browser without AMD, added to "window" on script load  // Note, there is no dash in "markdownit".  var md = window.markdownit();  var result = md.render('# markdown-it rulezz!');

项目主页:http://www.open-open.com/lib/view/home/1441786892867