Skip to content

Commit

Permalink
add link to regex docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Jun 2, 2024
1 parent bfdc44b commit 8b064fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function extractSections(markdown) {
.replace(/^#+\s*/, '')
// remove everything that is NOT a (Unicode) Letter, (Unicode) Number decimal,
// (Unicode) Number letter, white space, underscore or hyphen
// https://ruby-doc.org/3.3.2/Regexp.html#class-Regexp-label-Unicode+Character+Categories
.replace(/[^\p{L}\p{Nd}\p{Nl}\s_\-`]/gu, "")
// remove sequences of *
.replace(/\*(?=.*)/gu, "")
Expand Down

0 comments on commit 8b064fb

Please sign in to comment.