spiegel_podman/hack
Matt Van Horn b74c4a3ec7
fix(markdown-preprocess): preserve unknown tokens in render()
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>
2026-05-05 03:27:34 -07:00
..
perf hack/perf/system-df.sh: add df benchmarks 2023-08-23 14:17:27 +02:00
podman-registry-go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
apparmor_tag.sh Use bash binary from env instead of /bin/bash for scripts 2020-08-17 10:42:23 +02:00
bats hack/bats: port it to use the new remote support 2025-11-07 19:02:56 +01:00
branch_commits.rb Add script for identifying commits in release branches 2021-05-17 16:40:35 -04:00
btrfs_installed_tag.sh Use CPP, CC and flags in dep check scripts 2020-11-06 10:44:27 +01:00
buildah-vendor-treadmill RUN-4538: Fix buildah vendoring 2026-04-21 14:27:58 -05:00
check_root.sh Cleanup: fix problems reported by shell lint 2022-09-15 20:10:34 -06:00
fork_exec_snoop.bt Add eBPF snooper that traces the entire fork/exec graph of podman 2023-04-20 11:30:47 +02:00
get_ci_vm.sh Cirrus: Support EC2 instances in hack/get_ci_vm.sh 2022-08-03 14:25:09 -04:00
golangci-lint.sh ci: run golangci-lint on freebsd 2025-04-03 09:24:58 -07:00
install_golangci.sh hack/install_golang.sh: revamp 2025-04-02 19:19:05 -07:00
libsubid_tag.sh Fix libsubid detection 2022-09-23 09:58:39 +01:00
make-and-check-size Don't block builds on podman-testing growing in size 2025-03-31 17:59:29 +02:00
man-page-checker Add command podman system hyperv-prep 2026-04-29 23:00:29 +02:00
man-page-table-check Man pages: fix broken tables 2023-05-26 06:08:14 -06:00
markdown-preprocess fix(markdown-preprocess): preserve unknown tokens in render() 2026-05-05 03:27:34 -07:00
markdown-preprocess-review Man pages: refactor common options: cert-dir 2022-08-22 05:52:20 -06:00
markdown-preprocess.t fix(markdown-preprocess): preserve unknown tokens in render() 2026-05-05 03:27:34 -07:00
podman-commands.sh Add shell completion with cobra 2020-11-12 11:38:31 +01:00
podman-registry CI: use local registry, part 2 of 3: fix tests 2024-07-11 04:39:45 -06:00
podman-socat move old registries.conf v1 files to v2 2026-04-23 13:19:04 +02:00
podman_cleanup_tracer.bt hack/podman_cleanup_tracer.bt: check map before deleting keys 2025-07-09 14:02:11 +02:00
podmansnoop chore(podmansnoop): explain why crun comm is 3 2024-08-09 10:57:59 +02:00
podmanv2-retry Use bash binary from env instead of /bin/bash for scripts 2020-08-17 10:42:23 +02:00
sqlite_tag.sh Makefile: use libsqlite3 build when possible 2025-06-10 15:52:11 +02:00
swagger-check Add POST /libpod/quadlets 2025-12-17 14:37:12 +01:00
systemd_tag.sh Use CPP, CC and flags in dep check scripts 2020-11-06 10:44:27 +01:00
tree_status.sh hack/tree_status.sh: print diff at the end 2022-10-14 09:39:37 +02:00
xref-docker-options Remove references and checks for --gpus 2024-07-17 12:02:51 -04:00
xref-helpmsgs-manpages Add --format to image scp 2026-03-19 17:42:33 +01:00
xref-helpmsgs-manpages.t xref-helpmsgs-manpages: cross-check Commands.rst 2024-03-18 09:09:25 -06:00
xref-quadlet-docs Rewrite the Quadlet documentation 2026-05-04 10:53:36 +02:00