You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the fm-var family with a block-level <fm-table> element for rendering tabular YAML data as a useful cached table in ordinary Markdown views.
This is a specification proposal, not yet an implementation issue. <fm-table> is not part of RFC 001 Rev 3, so its portable syntax and semantics should be agreed in the DandyLyons/fm-var-tag specification before md-utils treats it as conforming behavior.
<fm-var> covers one scalar and <fm-list> covers one sequence, but neither naturally represents repeated records such as releases, dependencies, contacts, benchmarks, or project status:
The exact columns and headers grammar above is deliberately provisional. The final design must avoid ambiguous delimiter/escaping rules and must not depend on mapping enumeration order.
The tag should share the established source/query/fallback vocabulary where it has the same meaning:
src
query
default-zero
default-null
effective locale/format configuration where applicable
Proposed v1 data model
The table query selects exactly one sequence.
Every row must have one consistent supported shape.
Initially support either:
a sequence of mappings with an explicit, ordered column selection; or
a rectangular sequence of scalar sequences with an explicit header policy.
Cells are scalar or null only. Nested mappings/sequences, mixed row shapes, missing required columns, and ragged matrix rows fail atomically unless the specification explicitly defines a fallback.
Row order and duplicate rows are preserved.
Column order is always explicit and deterministic; portable behavior must not rely on JSON/YAML object enumeration order.
Zero selected nodes and an empty selected sequence use default-zero or produce a distinct unresolved-zero result.
A selected null uses default-null or produces a distinct unresolved-null result.
A table failure retains the complete existing cache; synchronization never writes a partial table.
Cache and rendering model
<fm-table> is a block element and must stand on its own lines.
A successful dynamic cache uses one canonical, tightly constrained HTML table shape so the cache remains inside the custom element and is viewable without hydration.
Only the table structure required by the specification is permitted: table, optional thead, tbody, tr, th, and td, with any allowed alignment/accessibility attributes explicitly enumerated.
Header and cell text use the fm-var family’s text-only escaping and injection protections.
Literal zero/null fallbacks contain escaped literal text rather than an empty table wrapper.
Cache comparison is byte-deterministic under the document’s line-ending and indentation rules.
Should the extension advance the RFC revision, become a separate RFC, or remain an optional capability?
Proposal acceptance criteria
The user problem and non-goals are validated with representative YAML/table examples.
The fm-var specification repository records the selected syntax, row shapes, cardinality, fallbacks, formatting, cache grammar, escaping, and resource-limit behavior.
Column order is explicit and never depends on mapping enumeration order.
Cache HTML and vanilla-Markdown conversion have deterministic, injection-safe algorithms.
Interaction with <fm-format>, inspect/explain, validation, synchronization, and to-markdown is specified.
Follow-up md-utils implementation issues are split into parser/model, evaluation/rendering, CLI integration, conversion, documentation, and conformance work with explicit dependencies.
Non-goals for the initial proposal
Arbitrary HTML in cells.
Nested tables, row spans, or column spans.
SQL joins, grouping, pivoting, aggregation, sorting, or general spreadsheet formulas.
Recursive flattening of nested values.
Interactive tables, browser-only rendering, pagination, or editor UI.
Replacing a full data-frame, spreadsheet, or general-purpose templating system.
Proposal
Extend the fm-var family with a block-level
<fm-table>element for rendering tabular YAML data as a useful cached table in ordinary Markdown views.This is a specification proposal, not yet an implementation issue.
<fm-table>is not part of RFC 001 Rev 3, so its portable syntax and semantics should be agreed in theDandyLyons/fm-var-tagspecification before md-utils treats it as conforming behavior.Related epic: #111.
Motivation
<fm-var>covers one scalar and<fm-list>covers one sequence, but neither naturally represents repeated records such as releases, dependencies, contacts, benchmarks, or project status:A first-class table tag would keep this YAML authoritative while leaving a readable cache in GitHub, detached snippets, feeds, and LLM context.
Strawman syntax
The exact
columnsandheadersgrammar above is deliberately provisional. The final design must avoid ambiguous delimiter/escaping rules and must not depend on mapping enumeration order.The tag should share the established source/query/fallback vocabulary where it has the same meaning:
srcquerydefault-zerodefault-nullProposed v1 data model
default-zeroor produce a distinct unresolved-zero result.default-nullor produces a distinct unresolved-null result.Cache and rendering model
<fm-table>is a block element and must stand on its own lines.table, optionalthead,tbody,tr,th, andtd, with any allowed alignment/accessibility attributes explicitly enumerated.fm-var to-markdown/to-mdworkflow converts the canonical HTML cache into a vanilla Markdown pipe table and removes the<fm-table>wrapper.Column-definition design requirement
Before standardizing the tag, choose one portable way to define ordered columns and their headings. Candidate designs include:
columnsattribute plus optional headings.<fm-column>elements.The choice must address:
Integration expectations
If the specification adopts
<fm-table>, md-utils implementation work should:Security and accessibility
Questions to resolve in the specification
type,format, locale, alignment, or null presentation independently?Proposal acceptance criteria
<fm-format>, inspect/explain, validation, synchronization, andto-markdownis specified.Non-goals for the initial proposal