Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render html in heading #1622

Merged
merged 3 commits into from
Mar 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
simplify tag regex
  • Loading branch information
UziTech committed Mar 22, 2020
commit 193a41e78d625765075f652a152366e1e1e17435
2 changes: 1 addition & 1 deletion src/Slugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = class Slugger {
.toLowerCase()
.trim()
// remove html tags
.replace(/<!?\/?[\w-]+(?: .*)?\/?>/g, '')
.replace(/<[!\/a-z].*?>/ig, '')
// remove unwanted chars
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
.replace(/\s/g, '-');
Expand Down