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

Commit

Permalink
Remove bold and italic marks
Browse files Browse the repository at this point in the history
Fixes #30
  • Loading branch information
mcornella committed Sep 23, 2020
1 parent c74195a commit 5fdee53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ class MarkdownTocTools {
let baseTitle = title.replace(/^(?:\d+\.)+/, "").trim(); // title without section number
title = title.replace(/\[(.+)]\([^)]*\)/gi, "$1"); // replace link
title = title.replace(/<!--.+-->/gi, ""); // replace comment
title = title.replace(/\#*/gi, "").trim(); // replace special char
title = title.replace(/\#/gi, "").trim(); // replace special char
title = title.replace(/\b[_*]|[*_]\b/gi, ""); // replace bold and italic marks

if (!(title in hashMap)) {
hashMap[title] = 0;
Expand Down

0 comments on commit 5fdee53

Please sign in to comment.