4.3: a bare backtick run escapes wherever a later string of its length forms around an escape

This commit is contained in:
2026-09-15 22:28:51 +02:00
parent 7d20f3e895
commit b6ba440410
4 changed files with 106 additions and 10 deletions
+4 -2
View File
@@ -54,8 +54,10 @@ normalizes to it through the round-trip.
- Entity references in input decode to their characters; output backslash-escapes only where text
would otherwise parse as syntax, scanning the assembled line rather than each text node: escape
the leading delimiter of a construct that would otherwise open, re-scan from there, and repeat.
A backtick run escapes whole, and a lone backtick escapes wherever an escaped one follows it in
the same inline content: CommonMark reads no escape inside a code span, so `` \` `` closes one.
A backtick run escapes whole, and a bare one escapes wherever a later backtick string of its
length forms around an escape in the same inline content — an escaped backtick alone, one joined
to the bare run after it, or a bare run an escape splits off: CommonMark reads no escape inside a
code span, so such a string still closes one.
Where a paragraph opens with what reads as a link reference definition, which resolves before
any inline construct binds (a `]` inside a code span or `{attrs}` counts), an opening text `[`
escapes and an opening link's nodes ride the carry.