Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit 5fdee53

Browse files
committed
Remove bold and italic marks
Fixes #30
1 parent c74195a commit 5fdee53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ class MarkdownTocTools {
377377
let baseTitle = title.replace(/^(?:\d+\.)+/, "").trim(); // title without section number
378378
title = title.replace(/\[(.+)]\([^)]*\)/gi, "$1"); // replace link
379379
title = title.replace(/<!--.+-->/gi, ""); // replace comment
380-
title = title.replace(/\#*/gi, "").trim(); // replace special char
380+
title = title.replace(/\#/gi, "").trim(); // replace special char
381+
title = title.replace(/\b[_*]|[*_]\b/gi, ""); // replace bold and italic marks
381382

382383
if (!(title in hashMap)) {
383384
hashMap[title] = 0;

0 commit comments

Comments
 (0)