Skip to content

Two renderings for a document: markdown, and terminal rendered from it #826

Closed

Description

@David-Noble-at-work

The renderings are csv, json, list, none, table, template=BODY, value and yaml. None of them produces a
document, and none renders one for reading. A report reaches the terminal today as markdown source through
--output value — ##, |---|, **, and all.

Observed

Measured 2026-09-14 on this tree, offline:

$ star docs starlark --output value --silent | head -3
WRITING STARLARK OPERATIONS

Commands are defined as extensions in the star/extensions/ directory.

$ star docs starlark --silent | head -c 80
"WRITING STARLARK OPERATIONS\n\nCommands are defined as extensions in the star/ext

value does emit a scalar string verbatim, and §8's shape table contracts it (row S1: "one row, one
column, no header"). The original complaint on this issue — that the behavior is an accident — was wrong.
What is missing is a document, and a rendering of it.

Wanted

Two renderings, in a chain. The pipeline is JSON-native — [Pipeline.Emit] normalizes every result to JSON
before any formatter runs — so the chain is JSON → markdown → terminal:

  • markdown derives a markdown document from the JSON, sharing table's key derivation: a GFM table
    where the derivation yields headers, a bullet list where it does not, a non-scalar cell as compact JSON.
    A scalar string passes through verbatim: it is already the document.
  • terminal runs markdown and renders it through glamour under a style of our own. Every marker is
    consumed and re-emitted as an attribute: headings bold, ** bold, * italic, code spans colored,
    tables box-drawn with their links collected under them as footnotes, text word-wrapped. Nothing is
    probed — the color profile and the style are fixed — so the bytes are the same piped or on a TTY, and §7's
    rule against output that changes when observed holds without exception.

Names ruled by the owner 2026-09-14. plain was rejected because the prior art uses it for the opposite —
pandoc's --to plain removes markup and emits no escape codes. ansi was rejected because it names a
national standards body. terminal names the destination, the way groff's -Tutf8 names its device.

No --markdown flag survives this work, also ruled 2026-09-14: a report returns data and
--output markdown derives its document.

Not this

  • text, the rendering chartered in docs/plans/result-text-formatter.md on 2026-08-10, is
    tabwriter-aligned columns under a header row — which shipped as table. That document is stale and this
    issue supersedes it.
  • Paging. #830 — a long document wants a pager,
    and that is lane 7.

Epic: #740 · Feature: #833

Activity

  1. changed the title [-]No text rendering: a scalar string result has no way to reach stdout verbatim[/-] [+]Two renderings for a document: markdown, and plain rendered from it[/+] on Sep 14, 2026
  2. changed the title [-]Two renderings for a document: markdown, and plain rendered from it[/-] [+]Two renderings for a document: markdown, and terminal rendered from it[/+] on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:CommandLineOne output convention across every CLI in the suitetaskImplementation work item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions