Fix empty code blocks: rename ~docs/code param, fix batched IO dispatch
Two bugs caused code blocks to render empty across the site: 1. ~docs/code component had parameter named `code` which collided with the HTML <code> tag name. Renamed to `src` and updated all 57 callers. Added font-mono class for explicit monospace. 2. Batched IO dispatch in ocaml_bridge.py only skipped one leading number (batch ID) but the format has two (epoch + ID): (io-request EPOCH ID "name" args...). Changed to skip all leading numbers so the string name is correctly found. This fixes highlight and other batchable helpers returning empty results. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -176,7 +176,7 @@
|
||||
(p "Python closures can read but not rebind outer variables. "
|
||||
(code "py.sx") " detects " (code "set!") " targets that cross lambda boundaries "
|
||||
"and routes them through a " (code "_cells") " dict:")
|
||||
(~docs/code :code (highlight ";; SX ;; Python
|
||||
(~docs/code :src (highlight ";; SX ;; Python
|
||||
(define counter def counter():
|
||||
(fn () _cells = {}
|
||||
(let ((n 0)) _cells['n'] = 0
|
||||
|
||||
Reference in New Issue
Block a user