markdown-next parser
Below is the list of what is supported:
- [x] strong
- [x] em
- [x] p
- [x] headers(h1, h2, h3, h4, h5, h6)
- [x] ul
- [x] ol
- [x] a
- [x] code
- [x] blockquote(nesting is allowed)
- [x] table
- [x] img
Note: This project is currently beta. Any API will be changed without notice.
Clone this repo and execute npm run install
.
const markdown = require("markdown-next")
Returns parsed html string.
This is mostly shorthand of new Parser({type: asHTML}).parse
.
parse(string)
It takes ExportType
object and make new parser.
Currently, there are two options: asHTML
and asAST
which creates HTML and AST respectively
const markdown = require("markdown-next")
const parser = new markdown.Parser({
export: markdown.asHTML
})
parser.parse(string)
Run npm test
command for testing. Under test
contains unit tests.
Any suggestion or PR is welcome.
MIT