diff --git a/lib/util/parseHeaders.js b/lib/util/parseHeaders.js index eb15dab930..e1768f7a9e 100644 --- a/lib/util/parseHeaders.js +++ b/lib/util/parseHeaders.js @@ -13,9 +13,9 @@ const unescapeHtml = html => String(html) .replace(/>/g, '>') const removeMarkdownToken = str => String(str) - .replace(/\[(.*)\]\(.*\)/, '$1') // []() - .replace(/(`|\*\*|\*|_)(.*[^\\])\1/, '$2') // `{t}` | *{t}* | **{t}** | _{t}_ - .replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\' + .replace(/\[(.*)\]\(.*\)/, '$1') // []() + .replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_ + .replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\' exports.removeTailHtml = (str) => { return String(str).replace(/<.*>\s*$/g, '')