11---
2- title : " Callout with invalid ID prefix"
2+ title : " Callout with invalid ID prefix (#13589) "
33format :
44 typst :
55 keep-typ : true
66_quarto :
77 tests :
88 typst :
99 ensureTypstFileRegexMatches :
10- - ['#callout\(']
11- - []
10+ -
11+ # Should render as plain callout with body parameter
12+ - ' #callout\(\s*body:'
13+ -
14+ # Should NOT be wrapped in figure+block structure
15+ - ' #figure\(\[(\r\n?|\n)#block\[(\r\n?|\n)#callout'
1216 printsMessage :
1317 level : INFO
1418 regex : ' WARNING(.*)Callout ID '' random-id'' has unknown reference type '' random'' '
@@ -17,16 +21,18 @@ _quarto:
1721
1822## Test callout with invalid crossref ID
1923
20- This tests that callouts with invalid ID prefixes (not matching any known crossref category)
21- should render with a warning instead of crashing.
24+ This tests the fix for issue #13589 : callouts with invalid ID prefixes
25+ (not matching any known crossref category) should render with a warning
26+ instead of crashing with "attempt to index a nil value".
2227
2328::: {#random-id .callout-note}
2429
2530## Note with invalid ID
2631
27- This callout uses ` #random-id ` which has an unknown prefix "random".
28- The valid prefixes are: fig, tbl, lst, nte, wrn, cau, tip, imp, prf, rem, sol.
32+ This callout uses ` #random-id ` with unknown prefix "random".
2933
30- This should render successfully with a warning, not crash.
34+ Valid prefixes are: fig, tbl, lst, nte, wrn, cau, tip, imp, prf, rem, sol.
35+
36+ Expected behavior: renders as plain callout (no figure wrapping) with warning.
3137
3238:::
0 commit comments