fix(docs): render Component Reference tables as real Markdown tables #76
Reference in New Issue
Block a user
Delete Branch "docs-ruled-tables"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The "Component Reference" tables in the Customization section (C1–C6) were rendering as plain indented code blocks on the Starlight site instead of real Markdown tables.
Root cause:
_as_table()indocs/build-manual.pyonly detects a table when data rows are indented deeper than a":"-terminated label (the "Options:" convention used elsewhere). The Component Reference tables use a different, unrelated convention — header row, a solid dashed rule, then data rows all at the same indent — so they never matched and always fell through to the plain code-block fallback.What changed
_as_ruled_table()to recognize the header+rule+rows shape. Unlike_as_table(fixed at 2 columns), it supports N columns.<or{(e.g.<session>placeholders,{ }brace globs) are backtick-escaped rather than causing the whole table to be rejected —_as_table's stricter reject-on-</{guard was left untouched since a test locks in that behavior for its own convention.None/code-block, since that's a real source-authoring bug, not something to guess at.docs/manual/07-customization.md(C1:du,help config,claude; C4:Done desktop notifications) where two columns had collapsed to a single space, making them ambiguous with a continuation line._render_para's output still feeds the man page /config-helppath unchanged;test_prettify_is_site_onlyconfirms that invariant still holds.No user-facing commands, flags, or behavior changed — doc generator only. README audited, no updates needed.
Manual Verification
python3 docs/verify-manual.pyfromdocs/— expect29/29 passed<session>/<win>/<pane>placeholders as inline code, not broken/escaped text{ }braces as inline codedocs/fish-config.1) andconfig-helpoutput for the Customization section are unchanged (still plain indented text, not tables)_as_table() only detects tables whose data rows are indented deeper than a ":"-terminated label. The "Component Reference" tables use a different convention (header, dashed rule, rows all at the same indent), so they never matched and fell through to a plain indented code block on the Starlight site. Add _as_ruled_table() to recognize that header+rule+rows shape. It supports N columns, folds word-wrapped continuation lines into the previous row, and backtick-escapes cells containing "<" or "{" instead of rejecting the table outright (unlike _as_table's stricter guard, which those tables would otherwise trip on for angle-bracket placeholders and brace globs). Also fixes four ambiguous rows in 07-customization.md where two columns had collapsed to a single space, making them indistinguishable from a word-wrapped continuation.