Commit 29ea947
Fix visitListItem not being called by MarkupVisitor protocol dispatch
The existing `visitListItem(_:orderedIndex:)` method has a second
defaulted parameter, which means it does not satisfy the
`MarkupVisitor` protocol requirement `visitListItem(_:)`. Swift
resolves the protocol dispatch to the default extension implementation
(which calls `defaultVisit`) instead of this type's method, so list
item prefixes (bullets, numbers) are never inserted and newlines
between items are lost.
Add a one-parameter overload that matches the protocol signature and
delegates to the two-parameter version.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5996fba commit 29ea947
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
| |||
0 commit comments