You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example's own code and output show single backslashes, so the figure contradicts the cell it sits under.
Why
`bytes_vs_bytearray` in `src/marginalia.py` writes the labels as Python string literals with four backslashes (`"b'\\\\x63…'"`). Each pair collapses to one literal backslash, so the rendered text carries two. The grammar then XML-escapes the text correctly, so the doubled characters reach the browser as-is.
Why it shipped
The figure contracts in `tests/test_marginalia_geometry.py` check geometry (clipping, collision, palette, stroke, accent count) but never check label content against the example. Nothing compares a figure's mono text with the cell's code or output.
Fix
Use two backslashes per escape in the paint strings (or a raw string).
Add a content contract: no rendered figure text may contain a doubled backslash, and mono labels that contain an escape sequence must appear verbatim in the example's code or output.
Activity