loading code fetching the highlighted snippet
Rebuild a fresh extensions array from Svelte state whenever display format changes. The custom tokenizer captures the current format and the parser cache sees a new extension identity.
extensions as immutable: assign a new array when reactive inputs
change instead of mutating with push, splice, or length = 0.displayButton token.$derived([makeCustom(displayFormat), markedKatex(), markedFootnote()]).Swap the format below. The same source markdown reparses with the newest tokenizer closure:
The important bit is the extension array identity. Rebuild it from state instead of mutating an existing array.
Try typing here: dispatch rescue team to decimal lock 47.6062, -122.3321.
No coordinate tokens yet. Add something like @(42.36, -71.06).