Skip to content

Commit

Permalink
Merge pull request #91 from itsramiel/fix/horizontal-rules
Browse files Browse the repository at this point in the history
fix: fix horizontal rules
  • Loading branch information
zuchka authored Dec 14, 2024
2 parents 809d449 + 852f503 commit 816a303
Show file tree
Hide file tree
Showing 3 changed files with 514 additions and 211 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function(md, options) {
var output = md || '';

// Remove horizontal rules (stripListHeaders conflict with this rule, which is why it has been moved to the top)
output = output.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*/gm, '');
output = output.replace(/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/gm, '');

try {
if (options.stripListLeaders) {
Expand Down
Loading

0 comments on commit 816a303

Please sign in to comment.