提交 ec330f09 编写于 作者: M mechdude 提交者: ULIVZ

fix: multiple markdown tokens in header text (#564)

上级 5afff6fe
......@@ -14,7 +14,7 @@ const unescapeHtml = html => String(html)
const removeMarkdownToken = str => String(str)
.replace(/\[(.*)\]\(.*\)/, '$1') // []()
.replace(/(`|\*\*|\*|_)(.*[^\\])\1/, '$2') // `{t}` | *{t}* | **{t}** | _{t}_
.replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_
.replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\'
exports.removeTailHtml = (str) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册