docs: generate server options as list-table for stable diffs - #4426
Open
stevenvegt wants to merge 2 commits into
Open
docs: generate server options as list-table for stable diffs#4426stevenvegt wants to merge 2 commits into
stevenvegt wants to merge 2 commits into
Conversation
The simple-table format pads every cell to the widest value in its column, so a single new option with a long description rewrites the entire table (as happened in #4420, where 2 new options produced a 142-line diff). A list-table has no cross-row alignment: adding an option is always a 3-line diff. The rendered HTML is identical, verified by diffing Sphinx output of both formats. Also removes a stray debug println from the generator. Assisted-by: AI
The docs/Dockerfile existed but nothing referenced it. The new target builds the documentation without requiring Python/Sphinx on the host. Assisted-by: AI
stevenvegt
requested review from
Dirklectisch,
JorisHeadease,
gerardsn,
reinkrul and
woutslakhorst
as code owners
July 27, 2026 15:25
Contributor
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (2)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Changes the server options documentation generator to emit a
list-tabledirective instead of an RST simple table, and adds adocs-dockerMakefile target.Why
The simple-table format pads every cell to the widest value in its column. Adding one option whose key, default, or description becomes the new column maximum reformats every row in the file. In #4420, adding 2 options produced a 142-line diff in
server_options.rstbecause the new description was 9 characters longer than the previous longest, adding 9 trailing spaces to all 70 rows.A list-table has no cross-row alignment: each row is its own 3-line block, so adding an option is always a 3-line diff, regardless of value lengths.
How
docs/rst_table.go:printRstTableemits* - key/- default/- descriptionblocks. Empty cells become a bare-(no trailing whitespace anywhere in the output).docs/generate_docs.go: directive changed to.. list-table::with:header-rows: 1, keeping the existing:widths: 20 30 50and:class: options-table. Also removes a stray debugprintlnthat wrote to stderr on every generation run.docs/generate_docs_test.go: new test pinning the output format, including bold engine rows,\:8080escaping, and empty cells.server_options.rstandserver_options_didnuts.rstregenerated (one-time full rewrite).make docs-dockertarget: builds the docs with the existing (previously unreferenced)docs/Dockerfile, so no Python/Sphinx tooling is needed on the host.Rendering is unchanged
Verified by running the containerized Sphinx build against both the old and the new RST and diffing the output: the rendered tables in
configuration.htmlare byte-identical (both directives produce the same docutils table node, with the same caption, column widths, and CSS class). The build shows the same 4 pre-existing warnings in both runs, none related to these files.