RemarkableMarkdown 解析器
Remarkable 是一個純 JavaScript 的 Markdown 解析器,解析速度快而且易于擴展。100% 支持 Commonmark
使用方法:
var Remarkable = require('remarkable');
// This values are default
var md = new Remarkable({
html: false, // Enable html tags in source
xhtmlOut: false, // Use '/' to close single tags (<br />)
breaks: false, // Convert '\n' in paragraphs into <br>
langPrefix: 'language-', // CSS language prefix for fenced blocks
linkify: false, // Autoconvert url-like texts to links
typographer: false, // Enable smartypants and other sweet transforms
// Highlighter function. Should return escaped html,
// or '' if input not changed
highlight: function (/*str, , lang*/) { return ''; }
});
console.log(md.render('# Remarkable rulezz!'));
// => <h1>Remarkable rulezz!</h1>評論
圖片
表情
