Commit Graph

4 Commits

Author SHA1 Message Date
gsb
d41716c8b2 Reimplement as a tokenizer with GFM parity 2026-04-30 07:09:19 +00:00
gsb
1f523cbc0f Implement Toolbar 2026-04-29 07:11:31 +00:00
gsb
98719ec8cd Use data- attributes to preserve macro configs 2026-04-29 05:19:17 +00:00
gsb
86d59877f1 feat: Add macro support
New: macros.ts with MacroDef, parseBlockMacro, matchInlineMacro,
buildMacroTags, processInlineMacros.

Macro syntax:
  @user                     — bare, no args
  @user()                   — empty parens, same as bare
  @npc(Goblin King)         — self-closing with args
  @style(box center         — block: no closing paren on first line
  Content here.             — content on subsequent lines
  )                         — closing paren on its own line

Unknown macro names now render as an error:
  <span class="ribbit-error">Unknown macro: @bogus</span>

The verbatim keyword causes the contents to render as literals and also
preserves line breaks.
2026-04-29 03:03:58 +00:00