0.0.2 • Published 3 years ago
markdown-parse-loader v0.0.2
markdown-parse-loader
module:{
rules:[
{
test:/\.md$/,
use:[
'babel-loader',
'markdown-parse-loader'
]
}
]
}
example
touch index.md
### 123
- aaa
- 2233
- qwrsl
- solqq
# qqq
[xxx](zzz)
![qq](xxx)
transform
[
{
"type": "h3",
"content": " 123"
},
{
"type": "li",
"content": "aaa"
},
{
"type": "li",
"content": "2233"
},
{
"type": "li",
"content": "qwrsl"
},
{
"type": "li",
"content": "solqq"
},
{
"type": "h1",
"content": " qqq"
},
{
"type": "content",
"content": "<a href=\"xxx\">zzz</a>"
},
{
"type": "content",
"content": "<img alt=\"qq\" src=\"xxx\"></img>"
}
]