From 3116afe905ec3e712e3a3655e4b40b0bb1d63c12 Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Fri, 27 Apr 2018 07:04:05 +0800 Subject: [PATCH] chore: add more markdown tokens to be removed --- lib/util/parseHeaders.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/util/parseHeaders.js b/lib/util/parseHeaders.js index 5f53578d66..b1b04baaa3 100644 --- a/lib/util/parseHeaders.js +++ b/lib/util/parseHeaders.js @@ -11,8 +11,11 @@ const unescapeHtml = html => html .replace(/>/g, '>') const removeMarkdownToken = str => str - .replace(/`(.*)`/, '$1') - .replace(/\[(.*)\]\(.*\)/, '$1') + .replace(/`(.*)`/, '$1') // `` + .replace(/\[(.*)\]\(.*\)/, '$1') // []() + .replace(/\*\*(.*)\*\*/, '$1') // ** + .replace(/\*(.*)\*/, '$1') // * + .replace(/_(.*)_/, '$1') // _ // put here to avoid circular references const compose = (...processors) => {