extendable markdown compiler
Features
- Extenable
- Github Mardown Syntax
Usage
1. install it by npm
npm install extendown
2. use it in nodejs or browser
The libray is packaged in UMD, you can import it in ES6 modules, CommonJS, AMD, etc.
3. how to use
; const parse = Extendownparse;;
4. how to extend
the following code is extend a inline feature
const parse = Extendownparse;const extend = Extendownextend;const feature = reg: '==(.+?)==' { return section; };; // <p><span style="background-color:yellow;">color</span></p>
the following code is extend a block feature
const feature = reg: '(?:^|\\n)@@\\n((?:[^@]*\\n)?)@@(?=\\n|$)' { return section; };;;// <article><p>here is your article</p>\n</article>
5. how to config
The most config is for emoji, we will provide more config in future.
You can change emoji image's url in following ways.
- change base path
configemojipath = 'https://dn-phphub.qbox.me/assets/images/emoji/';
- change extension
configemojiext = 'gif';
- change your format function
configemoji { return `test`;};
Basic Syntax
Refer to Github Markdown