md2txt/examples
randogoth d5046543b3 Add WML renderer for WAP decks
Adds a `wml` renderer plugin converting Markdown into WML decks for
old WAP browsers, following the existing parser -> BlockEvent stream
-> renderer plugin architecture (see gemini/micron/ama renderers).

WML content is idiomatically short and button/link-navigated rather
than one long page, so unlike the other renderers, `wml` can split a
document into multiple <card>s -- but only opt-in:

- Manual `{.card}` / `{.card Title}` divider directives (new,
  format-agnostic BlockKind.CARD_BREAK; silently ignored by every
  other renderer via their existing unhandled-kind no-op path).
- Heading-level splitting via `--renderer-option split_level=N`,
  ignored when manual dividers are present.
- Plain documents with neither stay a single card (the safe default).

When a document resolves to 2+ cards, a hub-and-spoke menu card is
built by default (button/link choices -> section, Back to menu), or
`menu=false` switches to a linear Next/Back chain. A byte-overflow
safety net (`max_card_bytes`, default 1400) paginates any single
section that's still too large.

Also adds GFM pipe-table support (BlockKind.TABLE) via the same
sentinel-injection preprocessing trick already used for ASCII art
blocks, so the parser's line-by-line loop needed no lookahead rework.
Rendered as `<table>` in wml, silently ignored elsewhere.

No new dependencies. No devbox/jj/test-suite additions -- decided
against for this repo (see README for the full option reference).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 08:22:14 +03:00
..
dragon.txt examples 2025-10-20 20:07:38 +03:00
loremipsum.ama ama code fix 2025-10-20 20:35:36 +03:00
loremipsum.gmi gemini protocol gemtext support 2025-10-20 18:40:59 +03:00
loremipsum.md ama code fix 2025-10-20 20:35:36 +03:00
loremipsum.mu alignment fix 2025-10-20 17:56:30 +03:00
loremipsum.txt examples 2025-10-20 20:07:38 +03:00
markdown.ama alignment fix 2025-10-20 17:56:30 +03:00
markdown.gmi gemini protocol gemtext support 2025-10-20 18:40:59 +03:00
markdown.md improvements 2025-10-19 23:22:15 +03:00
markdown.mu alignment fix 2025-10-20 17:56:30 +03:00
markdown.txt examples 2025-10-20 20:07:38 +03:00
wml-manual.md Add WML renderer for WAP decks 2026-09-23 08:22:14 +03:00
wml.md Add WML renderer for WAP decks 2026-09-23 08:22:14 +03:00
wml.wml Add WML renderer for WAP decks 2026-09-23 08:22:14 +03:00