Emphasis parsing: post-closer character set is narrower than org's #1

closed cmc opened this on 2026-08-31 18:39 UTC

Discussion

cmc 2026-08-31 18:39 UTC

Follow-up from the border-rule fix in 0.3.0.

scanEmphasis accepts a closer followed by whitespace or one of .,;:!?)]}'". Org's org-emphasis-regexp-components post set also includes -, the en and em dashes, \, and [. So

=verbatim=-adjacent

does not close, where Emacs closes it.

Low priority — none of the corpus cases reach it, and it was not what broke krz/gitbay's README. Noting it so the next person reading scanEmphasis knows the set is deliberate-but-incomplete rather than wrong.

cmc 2026-08-31 21:44 UTC

Two corrections to the description, from reading orgo's post_ok rather than recalling the Emacs defaults:

  • No en or em dashes. orgo's post set is ASCII only. A closer against — does not close, and did not before either, so nothing changes there.
  • No \. Not in the set.

And one thing the description missed: our set contained ], which org's does not. That leaves too.

The real delta was - and [ missing from the post set, and - missing from the pre set.

closed by commit 6e2ef80a16 by cmc: Match orgo's emphasis boundary characters

2026-08-31 21:46 UTC