|
@ -8,9 +8,7 @@ remarkable |
|
|
|
|
|
|
|
|
Markdown parser done right. Fast and easy to extend. |
|
|
Markdown parser done right. Fast and easy to extend. |
|
|
|
|
|
|
|
|
[Live demo](http://jonschlinkert.github.io/remarkable/demo/) |
|
|
__[Live demo](http://jonschlinkert.github.io/remarkable/demo/)__ |
|
|
|
|
|
|
|
|
/INTRO/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Install |
|
|
Install |
|
@ -35,11 +33,14 @@ Usage |
|
|
```javascript |
|
|
```javascript |
|
|
var Remarkable = require('remarkable'); |
|
|
var Remarkable = require('remarkable'); |
|
|
var md = new Remarkable({ |
|
|
var md = new Remarkable({ |
|
|
html: false, |
|
|
html: false, // enable html tags in source |
|
|
xhtml: false, |
|
|
xhtml: false, // use '/' to close single tags (<br />) |
|
|
breaks: true, |
|
|
breaks: true, // convert '\n' in paragraphs into <br> |
|
|
langprefix: 'language-', |
|
|
langprefix: 'language-', // css language prefix for fenced blocks |
|
|
highlight: function (str, lang) { return str; } |
|
|
|
|
|
|
|
|
// Should return HTML markup for highlighted text, |
|
|
|
|
|
// or empty string to escape source |
|
|
|
|
|
highlight: function (str, lang) { return ''; } |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
console.log(md.parse('# Remarkable rulezz!')); |
|
|
console.log(md.parse('# Remarkable rulezz!')); |
|
@ -54,10 +55,7 @@ var md = new Remarkable(); |
|
|
|
|
|
|
|
|
md.set({ |
|
|
md.set({ |
|
|
html: false, |
|
|
html: false, |
|
|
xhtml: false, |
|
|
breaks: true |
|
|
breaks: true, |
|
|
|
|
|
langprefix: 'language-', |
|
|
|
|
|
highlight: function (str, lang) { return str; } |
|
|
|
|
|
}); |
|
|
}); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|