Repository navigation
Commit 02f4b1d
claude: Fix latent bug in resolveCaptionCitations and simplify parsefiguredivs
Fix a 2021 bug in cites.lua where resolveCaptionCitations() returned
boolean instead of Inlines/nil. The Inlines walker expects either a
list of Inlines (modified) or nil (no changes), not true/false.
This bug was exposed by our change to preserve column-margin classes
on FloatRefTarget for Typst margin figure rendering. Previously,
parsefiguredivs stripped all layout classes, so hasMarginColumn(float)
always returned false and the buggy code path was never executed.
Also simplify the convoluted class filtering logic in parsefiguredivs
that partitioned classes into margin vs fullwidth groups.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 9eb89b1 commit 02f4b1d
2 files changed
Lines changed: 10 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 154 | + | |
157 | 155 | | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
385 | 382 | | |
386 | 383 | | |
387 | 384 | | |
| |||
0 commit comments