comcode-org / hackmud_wiki

https://wiki.hackmud.com/
Other
13 stars 22 forks source link

Fix autocolor bounds #365

Closed danswann closed 6 months ago

danswann commented 6 months ago

Problem

Fixes #363.

Existing behavior: image

Desired behavior: image

Context

Moved script / keyval / color-code / GC regex replacements to only act on the content match from the boundary ( (( )) ) regex. Requires a stub node in both cases. We are operating on text nodes one at a time, but text nodes cannot have children, so we have to make a fake parent whose only child is the bit we're interested in.

Can be manually verified by starting the dev server and manually navigating to the unlisted page at /autocolor_demo.