We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4503cfc commit 5e0651fCopy full SHA for 5e0651f
lib/util/parseHeaders.js
@@ -13,12 +13,9 @@ const unescapeHtml = html => String(html)
13
.replace(/>/g, '>')
14
15
const removeMarkdownToken = str => String(str)
16
- .replace(/`(.*)`/, '$1') // ``
17
- .replace(/\[(.*)\]\(.*\)/, '$1') // []()
18
- .replace(/\*\*(.*)\*\*/, '$1') // **
19
- .replace(/\*(.*[^\\])\*/, '$1') // *
20
- .replace(/_(.*[^\\])_/g, '$1') // _ _
21
- .replace(/(\\)(\*|_)/g, '$2') // remove escaped char '\'
+ .replace(/\[(.*)\]\(.*\)/, '$1') // []()
+ .replace(/(`|\*\*|\*|_)(.*[^\\])\1/, '$2') // `{t}` | *{t}* | **{t}** | _{t}_
+ .replace(/(\\)(\*|_|`)/g, '$2') // remove escape char '\'
22
23
exports.removeTailHtml = (str) => {
24
return String(str).replace(/<.*>\s*$/g, '')
0 commit comments