mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
The Quadlet documentation rewrite added a render() pass that handles
`<<if VAR>>...<<endif>>` and `<<X if cond else Y>>` conditionals before
the existing `<<a|b>>` substitution and `<<subcommand>>` replacement run.
Tokens that didn't match the new conditional grammar were silently
consumed instead of passed through, so any `<<a|b>>` whose content
didn't fit the conditional shape disappeared from the rendered output.
The user-visible regression (containers/podman#28645) was the line in
options/sysctl.md:
Note: <<if using the **--ipc=host** option|...>>, the above sysctls
are not allowed.
Both halves of the substitution start with "if", so the inner string
matched `inner.startswith("if ")`, but the rest of the conditional
recogniser fell through and the whole token was dropped. The same
codepath also dropped `<<subcommand>>` tokens, which insert_file()
expects to replace later.
Fix: when none of the conditional/inline-if branches match, append the
original `<<...>>` token verbatim so downstream replace_type and
`<<subcommand>>` replacement can handle it. Add render() tests covering
the conditional grammar plus the regression case.
Verified by rendering all 307 files under docs/source/markdown/options/
in both is_quadlet=True and is_quadlet=False contexts; no failures.
Closes #28645
Signed-off-by: Matt Van Horn <mvanhorn@gmail.com>
|
||
|---|---|---|
| .. | ||
| perf | ||
| podman-registry-go | ||
| apparmor_tag.sh | ||
| bats | ||
| branch_commits.rb | ||
| btrfs_installed_tag.sh | ||
| buildah-vendor-treadmill | ||
| check_root.sh | ||
| fork_exec_snoop.bt | ||
| get_ci_vm.sh | ||
| golangci-lint.sh | ||
| install_golangci.sh | ||
| libsubid_tag.sh | ||
| make-and-check-size | ||
| man-page-checker | ||
| man-page-table-check | ||
| markdown-preprocess | ||
| markdown-preprocess-review | ||
| markdown-preprocess.t | ||
| podman-commands.sh | ||
| podman-registry | ||
| podman-socat | ||
| podman_cleanup_tracer.bt | ||
| podmansnoop | ||
| podmanv2-retry | ||
| sqlite_tag.sh | ||
| swagger-check | ||
| systemd_tag.sh | ||
| tree_status.sh | ||
| xref-docker-options | ||
| xref-helpmsgs-manpages | ||
| xref-helpmsgs-manpages.t | ||
| xref-quadlet-docs | ||