Skip to content

Conversation

@fingolfin
Copy link
Member

  • support horizontal rules consisting of underscores
  • add missing 'breaking' decoration for horizontalrule to fix support for horizontal rules e.g. inside of lists
  • add support for horizontal rules to the GitHub flavor (it seems like an accident that it was missing before)
  • slightly rearrange the code to make it easier to understand (at least for me)

Fixes 6 CommonMark spec tests.

Also, order it before the "list" rule so that it can take precedence
(the symbols `-` or `*` can start both a list and a horizontal rule).

Actually, also add it to the GitHub flavor where it was missing,
presumably by accident.
Copy link
Member

@tecosaur tecosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always nice to see @test_broken replaced with @test. I'm not fussed about underscore rules myself, but the changes to implement them seem reasonable, and there were already tests waiting to pass.

@fingolfin fingolfin merged commit e8bf6c4 into master Jan 6, 2026
8 of 10 checks passed
@fingolfin fingolfin deleted the mh/md-horizontal-rule branch January 6, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants