Repository navigation
Description
A markdown provider: Starlark reads, walks and renders markdown documents through one parser, to HTML and to the terminal. Shared by every program, so a framework provider, a feature of this epic.
Asked for 2026-10-20: "We might also consider bringing in a markdown provider." Then: "Let's get on the record what the options are for markdown processors, including support for TUI and HTML."
Who would use it
- noblefactor-ops#319: reading schedule and thread tables. For issue bodies, GitHub's own parse (
bodyHTML) stays the exact answer; the provider serves documents on disk. - star lint markdown's frontmatter check is a 33-line stub while two bash gates enforce the real standard #932,
star lint frontmatter, andstar lint markdown: frontmatter and structure from one parse, not ad hoc scanning. - The knowledge extension: star devlore knowledge extracts, indexes, validates and signs what the registry teaches #1063, the knowledge extension: the registry's documents, read and written by structure.
The options
Read from each repository on 2026-10-20: its README, go.mod, license and activity.
Parsers that render HTML
| Library | Standard | GFM: tables, strikethrough, autolinks, task lists | Frontmatter | License | Activity | In devlore-cli |
|---|---|---|---|---|---|---|
| yuin/goldmark | CommonMark 0.31.2, AST with source positions | built in: extension.GFM, extension.Table |
goldmark-meta (YAML, MIT); abhinav/goldmark-frontmatter (YAML and TOML, BSD-3-Clause) | MIT | ★5,068; latest v2.1.6, 2026-09-27 | v1.7.16, indirect through glamour |
| gomarkdown/markdown | own dialect by default; parser.CommonMark mode passes all 652 CommonMark 0.31.2 examples, but in that mode its extensions, tables among them, do not apply |
tables in its default dialect, with footers | none built in | Simplified BSD | ★1,738; pushed 2026-10-11 | no |
| russross/blackfriday v2 | its own dialect; not CommonMark | tables | none | Simplified BSD | ★5,593; v2 branch's last commit 2020-10-27 | v2.1.0, indirect |
No maintained Go binding of github/cmark-gfm, GitHub's own parser, turned up in a search of GitHub.
Terminal (TUI) renderers
| Library | Parser beneath | What it gives | License | Activity | In devlore-cli |
|---|---|---|---|---|---|
| charmbracelet/glamour | goldmark (v1.8.5 on its main branch) | stylesheet-driven ANSI rendering, word wrap, tables, a gallery of styles; lipgloss v2 on main | MIT | ★3,737; latest v2.0.1, 2026-06-12 | v0.10.0, direct: -o terminal (pkg/result/terminal.go:102) |
| MichaelMure/go-term-markdown | gomarkdown (a 2022 commit) | terminal rendering with tables | MIT | ★295; pushed 2023-06-22 | no |
| charmbracelet/glow | glamour | an application, not a library: the reference for what glamour renders | MIT | ★27,742 | no |
GitHub's own rendering
| Source | What it gives |
|---|---|
GraphQL bodyHTML on an issue, pull request or comment |
the body as GitHub rendered it, its own parser exactly, with references already resolved to links; no extra request where the body is fetched anyway |
REST POST /markdown, mode gfm, with a repository context |
any text rendered by GitHub; one request per document, and network required |
The way back
JohannesKaufmann/html-to-markdown, MIT, ★3,835: HTML to markdown, should a document need to be written from HTML.
What the tree already holds
goldmark parses and glamour renders for -o terminal today. A provider over goldmark adds no parser to the build, and its terminal rendering would be the one -o terminal uses. Both have newer major lines than the tree pins (goldmark v2, glamour v2 on lipgloss v2).
The choice within goldmark: v1 or v2
goldmark's README (read 2026-10-20) says v2 was redesigned for semantic analysis and for generating markdown: every node holds its start position; the parser and renderer are separate, so formats other than HTML are easier; an AST can be built in code and rendered to another format. Its maintenance policy fixes bugs, security included, one major version back. Each third-party extension is marked for v1 and v2 there; goldmark-meta supports both.
glamour still parses with goldmark v1: v1.8.5 on its main branch, whose latest release is v2.0.1.
| Option | Gains | Costs |
|---|---|---|
| goldmark v1, with glamour | one parse feeds HTML and the terminal; nothing new in the build; since v1.8, positions on every node | writing markdown needs teekennedy/goldmark-markdown (★21) |
| goldmark v2; glamour stays on v1 | generating markdown is first-class, for the knowledge extension; the line goldmark is investing in | two goldmark versions in the build until glamour moves to v2; the terminal rendering parses separately |
Against goldmark: gomarkdown's CommonMark mode disables its extensions, tables among them, and its terminal renderer (go-term-markdown) was last pushed 2023-06-22, though it ships a markdown-to-markdown renderer (md/md_renderer.go); blackfriday is not CommonMark, and its v2 branch's last commit is 2020-10-27.
Decision
Ruled 2026-10-20: one goldmark, the line glamour uses. "Since Glamour is behind, we cannot use the latest and greatest goldmark. We must use the version that works with glamour."
- goldmark v1, at its newest: v1.8.6 (2026-09-03), module
github.com/yuin/goldmark. glamour requires goldmark v1.7.8 or newer within v1 (its v2.0.1 release; v1.8.5 on its main branch), and Go builds the newest version any module requires, so glamour runs on v1.8.6. The tree builds v1.7.16 today. - goldmark v2 (v2.1.6, 2026-09-27, module
github.com/yuin/goldmark/v2) waits for glamour: no glamour release or branch requires it as of 2026-10-20. The provider moves to v2 when glamour does. - Writing markdown back, for
--fixand the knowledge extension, needs a v1 markdown renderer: teekennedy/goldmark-markdown (★21, pushed 2026-08-03) is the candidate; to be evaluated in the plan. - glamour's own version is a separate decision, and goldmark v1.8.6 allows either: the tree pins v0.10.0; v2.0.1 (2026-06-12) requires goldmark ≥ v1.7.8 too. What v2 costs (its UPGRADE_GUIDE_V2.md, read 2026-10-20): the import path becomes
charm.land/glamour/v2;WithAutoStyle()is removed, called atcmd/internal/console/model.go:51and:426;WithColorProfile()is removed, called atpkg/result/terminal.go:104, color adaptation moving to Lip Gloss; and Lip Gloss v2 comes with it. The console pins the v1 line of the Charm stack: bubbletea v1.3.10 (latest v2.1.0, 2026-10-08), bubbles v1.0.0 (latest v2.2.1, 2026-08-24), lipgloss v1.1.1 snapshot (latest v2.0.6, 2026-08-11). glamour v2 alone leaves two Lip Glosses in the build; the coherent move takes glamour, Lip Gloss, Bubble Tea and Bubbles to v2 together. Ruled 2026-10-20: "Whole stack to v2." Filed as The Charm stack moves to v2 under charm.land: glamour, Lip Gloss, Bubble Tea and Bubbles together #1101, under Dependencies are updated every month: CI's actions, the linter, the Go modules and the toolchain #1019.
What goldmark v1.8.6 is used with
Read 2026-10-20 from each library's go.mod at the tag named. Correction: goldmark v1.8 added start positions to every node, inline nodes and link reference definitions included (commit "feat: add position information to all nodes", between v1.7.16 and v1.8.6); the comparison above first said only v2 had them.
| Component | Role | Version | Module | Requires goldmark | On v1.8.6 |
|---|---|---|---|---|---|
| goldmark | parser and HTML renderer | v1.8.6 (2026-09-03) | github.com/yuin/goldmark |
— | — |
| goldmark built-in extensions | GFM (table, strikethrough, linkify, task list), footnote, definition list, typographer, CJK | in v1.8.6 | github.com/yuin/goldmark/extension |
built in | yes |
| glamour | terminal rendering, -o terminal |
v0.10.0 pinned; v2.0.1 latest | github.com/charmbracelet/glamour; charm.land/glamour/v2 |
≥ v1.7.8, both | by requirement |
| goldmark-emoji | glamour's emoji | v1.0.6 (2025-04-19), last on v1 | github.com/yuin/goldmark-emoji |
≥ v1.7.10 | by requirement |
| chroma | glamour's code highlighting | v2.14.0, through glamour | github.com/alecthomas/chroma/v2 |
none | not goldmark-bound |
| abhinav/goldmark-frontmatter | frontmatter, YAML and TOML | v0.3.0 (2025-11-17) | go.abhg.dev/goldmark/frontmatter |
≥ v1.7.13 | by requirement |
| goldmark-meta | frontmatter, YAML only | v1.1.0 (2022-02-12), last on v1 | github.com/yuin/goldmark-meta |
≥ v1.4.6 | by requirement |
| teekennedy/goldmark-markdown | markdown written back | v0.5.1 (2025-04-24) | github.com/teekennedy/goldmark-markdown |
≥ v1.7.8 | by requirement |
| goldmark-highlighting | HTML code highlighting | none: every tag is v3, on goldmark v2 | — | v2 | no |
"By requirement": the library's go.mod admits v1.8.6, and Go builds the newest version required. Not yet proof: v1.8 represents link reference definitions as a new node type, which glamour v0.10.0 (written against v1.7.8) and goldmark-markdown have not seen. The plan's first step builds and renders with every row on v1.8.6. v1.8 also brings security fixes: dangerous URLs in links and images escaped, SVG refused in data:image URLs.
Open: frontmatter through abhinav/goldmark-frontmatter (maintained, YAML and TOML) or goldmark-meta (YAML, 2022); HTML code highlighting has no v1 option, needed only if the provider highlights code in HTML.
Plan and design documents
| Kind | Document |
|---|---|
| Plan | Not yet opened |
| Design | docs/architecture/3.5.17-markdown-provider.md, a stub, with its status companion and a proposed row in 3.5-provider-catalog.md; committed on chore/1101-charm-stack-moves-to-v2-under, landing with #1101's pull request |
Activity
chore(deps): the Charm stack moves to v2 under charm.land, and devlor…
David-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rule it breaks:
no-evidence: no Evidence of completion sectionDavid-Noble-at-work commentedon Nov 16, 2026
Another use, from #1229, filed on 2026-11-14 and closed on 2026-11-15 as a duplicate of this one: an issue's table of documents, read and set as values.
An issue ends with its
## Plan and design documentssection, a table of metadata values: each row a kind, such as Plan or Design, and the document it names. NobleFactor/noblefactor-engprod#557'sstar github plan link, merged in NobleFactor/noblefactor-engprod#567, writes that section from the plans that serve the issue. Until this provider exists it finds the section by the body's lines, with a TODO incommands/github-plan-link.starnaming this issue. With the provider it would:issuekey and itsdocuments:list.Plan and design documentssection and its table, the rows as entries.This is an issue body, not a document on disk, so GitHub's
bodyHTML, the exact answer for reading one, does not serve it: the command edits the body in place. A second use already in that extension isstar github schedule add's edit of a Schedule issue's## Amendmentssection, incommands/steps.star.