Commit e12f0d3
fix: keep escaped backslashes in angle-bracket link destinations
_parse_angle_link_href listed "\\" in its reject set, so any backslash
inside <...> made it return None and the whole link (or reference
definition) silently degraded to literal text. The bare-destination
branch in parse_link_href already consumes "\\" plus the next char, and
parse_link unescapes the result, so the escape machinery was already in
place and only this branch refused to feed it.
Consume the escape as a unit like the sibling branch does; an unescaped
"<", line ending, or NUL still terminates as before. Matches CommonMark,
which allows escaped "<"/">" inside an angle-bracket destination.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 719107f commit e12f0d3
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
0 commit comments