Skip to content

Commit 8366fa9

Browse files
committed
support img tag
1 parent 0232d05 commit 8366fa9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

create/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ const getDescription = (description) => {
4646
regexp: /<em>(.*?)<\/em>/ig,
4747
replacer: (_, $1) => `**${$1}**`
4848
},
49+
{
50+
regexp: /<img.*src="([^"]+)".*\/?>/ig,
51+
replacer: (_, $1) => `\n![](${$1})\n`
52+
},
4953
{
5054
regexp: /<strong>(.*?)<\/strong>/ig,
5155
replacer: (_, $1) => `**${$1}**`

0 commit comments

Comments
 (0)