a simple markdown parser for JavaScript. ⭐ demo
- Span Elements
auto link: <http://example.com/>
[This link](http://example.net/) has no title attribute.
![Alt text](/path/to/img.jpg)
*italicize*
`inline code`
**bold**
~~strikethrough~~
- Headers
# h1 {#heading-id}
## h2
### h3
- Lists
1. Step 1
* requirements
```sh
pip3 install --user
```
* build
1. make link
> blockquote, hh
2. make build
* delete
2. Step 2
1. first
- [x] task1
- [ ] task2
- Blockquotes
> blockquote
next line
>[success] blockquote
>> next block
>> * list 1
>> * list 2
>> ```
code in list
```
>
> next line
- Code
```go
package main
func main() {
println('mdzz')
}
```
- Table
left align | right align | center
:------| ------: | :------:
AND | 0 | 1
0 | 0 | 0
1 | 0 | 1
- HTML
<svg width="99" height="99">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="2" fill="#d89cf6"/>
</svg>
npm install moonprism-markdown --save
import markdown from 'moonprism-markdown'
let html = markdown('# hello world')
or download markdown.min.js, and import file in your page.
<script type="text/javascript" src="./markdown.min.js"></script>
<script type="text/javascript">
var html = markdown('# hello world')
</script>
markdown('# hello world', {
debug: true,
imageCDN: 'https://cdn.xx/',
linkTargetBlank: true
})