lys-markdown-parser
Advanced tools
Comparing version 2.2.3 to 2.2.4
{ | ||
"name": "lys-markdown-parser", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "js markdown parser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -44,3 +44,3 @@ import { | ||
get hr() { | ||
return /(^-{3,}\n)/; | ||
return /(^-{3,}\n|^-{3,}$)/; | ||
}, | ||
@@ -314,2 +314,16 @@ // ~~中划线~~ | ||
// hr | ||
if (Reg.hr.test(str)) { | ||
const [all] = str.match(Reg.hr) || []; | ||
if (all !== undefined) { | ||
changeCurrentNode({ | ||
type: 'hr', | ||
children: [], | ||
}); | ||
} | ||
slice(all); | ||
next(); | ||
return; | ||
} | ||
if ( | ||
@@ -439,16 +453,2 @@ parseQuote(str, ({ raw, content }) => { | ||
// hr | ||
if (Reg.hr.test(str)) { | ||
const [all] = str.match(Reg.hr) || []; | ||
if (all !== undefined) { | ||
changeCurrentNode({ | ||
type: 'hr', | ||
children: [], | ||
}); | ||
} | ||
slice(all); | ||
next(); | ||
return; | ||
} | ||
// 单行text | ||
@@ -455,0 +455,0 @@ if (Reg.text.test(str)) { |
204006
24
4363