Markdown + GFM parser and emitter
Find a file
2026-05-18 09:01:49 +02:00
AGENTS.md FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
commonmark-tests.r3 Initial commit 2026-05-17 21:29:35 +02:00
entities Initial commit 2026-05-17 21:29:35 +02:00
gfm-test.r3 FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
gfm-tests.r3 FEAT: GFM extension 2026-05-18 08:57:07 +02:00
gfm.r3 FEAT: GFM extension 2026-05-18 08:57:07 +02:00
lest.r3 FEAT: GFM extension 2026-05-18 08:57:07 +02:00
make-gfm-tests.r3 FEAT: GFM extension 2026-05-18 08:57:07 +02:00
markymark.r3 FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
mm-test.r3 FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
README.md FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
results FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
test-markdown.r3 FEAT: GFM extension added 2026-05-18 09:01:49 +02:00
tui.r3 FEAT: GFM extension 2026-05-18 08:57:07 +02:00

MarkyMark

MarkyMark is a Rebol 3 Markdown parser and renderer. It parses Markdown into a small Lest document IR, then renders that IR as HTML or styled terminal text.

Repository Layout

Path Purpose
markymark.r3 Markdown parser module. Exports markymark and markdown-options.
gfm.r3 GitHub Flavored Markdown extension module for markymark/with source [gfm].
lest.r3 Lest IR helpers and renderers for HTML and terminal output.
tui.r3 Terminal UI dialect used by the terminal renderer.
test-markdown.r3 Focused parser regression test suite.
mm-test.r3 CommonMark fixture runner and status reporter.
gfm-test.r3 GFM extension fixture runner.
make-gfm-tests.r3 Generates gfm-tests.r3 from the official GFM spec source.
commonmark-tests.r3 CommonMark examples encoded as Rebol data.
gfm-tests.r3 Generated GFM examples encoded as Rebol data.
entities Named HTML character reference data loaded by the parser.
results Snapshot of the CommonMark pass/fail set and checksums.

Requirements

  • Rebol 3 executable available as r3

There is no package manager or build step in this checkout.

Quick Usage

Create a small Rebol script in this directory:

Rebol []

import %markymark.r3
import %lest.r3

source: "# Hello^/This is **Markdown**.^/"
doc: markymark source
gfm-doc: markymark/with "| a | b |^/| - | - |^/" [gfm]

print render/as doc 'html
print render/as gfm-doc 'html
print render/as doc 'terminal

markymark returns a Lest document:

[doc [heading 1 [text "Hello"] para [text "This is " strong [text "Markdown"] text "."]]]

Tests

Run the focused regression suite:

r3 -s test-markdown.r3

Expected current result:

314 markdown tests, 0 failure(s)

Run the GFM extension fixture suite:

r3 -s gfm-test.r3

Expected current result:

24 GFM extension tests passed, 0 tests failed.

gfm-tests.r3 contains all generated GFM spec examples; gfm-test.r3 runs the extension-tagged examples while mm-test.r3 remains the CommonMark baseline.

Run the CommonMark fixture suite:

r3 -s mm-test.r3

Expected current result:

652 tests passed, 0 tests failed.
CommonMark.reb is 100% ready.
0 improvements
0 regressions

The current CommonMark pass/fail snapshot is tracked in results.

mm-test.r3 rewrites results when parser checksums, fixture checksums, or the pass/fail set changes.

Development Notes

  • Keep parser changes covered by test-markdown.r3.
  • Run all three test commands before considering parser or renderer changes complete.
  • When changing the Lest IR, update markymark.r3, lest.r3, and tests together.
  • entities, commonmark-tests.r3, and results are data files; edit them only when intentionally updating fixtures or the conformance snapshot.

License

No repository-level license file is present in this checkout. tui.r3 declares MIT license metadata for that module.