refactor: common symbol template#1225
Conversation
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1225 +/- ##
========================================
Coverage 81.97% 81.97%
========================================
Files 34 34
Lines 3179 3179
Branches 743 743
========================================
Hits 2606 2606
Misses 392 392
Partials 181 181
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c720f4f30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
An automated preview of the documentation is available at https://1225.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-06-10 15:35:25 UTC |
Make tables render from data. `markup/table` takes `headers`, `items`, and `columns`. Cells use the `markup/cell` partial. With this, we move the symbol page out of the per-format adoc and html templates and into a single `common/partials/symbol.hbs`. This makes generators impossible to drift at the symbol level and data-driven generators much easier to write because they don't have to redefine the symbol template.
The symbol page now lives in a single common template, so the data-driven examples no longer need their own `symbol.<id>.hbs`. Each example is just a handful of format-specific markup primitives (table, section, admonition, list items, paragraph, heading, brief) plus the layout wrappers. Everything else comes from common and html.
The symbol page used to live as two big format-specific templates (adoc, html) that drifted apart and had to be kept in sync by hand. This happened because the table partial wasn't easy to abstract. We wrote a data-level template partial and symbol.hbs now lives as one common template for all format. This also allowed the Markdown and TeX example generators from the documentation to collapse from hundreds of lines of per-format markup to a small set of primitives plus a wrapper, so they read like a good demo of how easy a new data-driven generator should be.
Changes
symbol.hbsplus per-section partials and per-format markup primitives, replacing the twosymbol.{adoc,html}.hbstemplates. A few small divergences across formats were also aligned as part of the same change.latexas renamed totex(that's the appropriate filename), so nowCMakeLists.txtliststex(instead oflatex) alongsidemdandjsonl.Testing
mrdocs-test-test-fixtures-allalready covers all formats; goldens were regenerated only after reviewing each diff.Documentation
The generators index gained a "More formats as extensions" section pointing at the md, tex, and jsonl starters under
examples/.