fix(cli): render experimental callout without markdownify round-trip#25217
Open
aheritier wants to merge 1 commit into
Open
fix(cli): render experimental callout without markdownify round-trip#25217aheritier wants to merge 1 commit into
aheritier wants to merge 1 commit into
Conversation
The experimental notice on CLI reference pages was being produced by running a Hugo shortcode through markdownify. The shortcode template embeds the icon partial, and the recent migration to multi-line Heroicons SVGs (commit ee71c80) pushed the inner SVG path to a 4-space indent inside the expanded HTML. markdownify then re-parsed that HTML as Markdown and treated the indented lines (the SVG path plus the trailing </span> and <strong>Experimental</strong>) as a fenced code block, which is what users see on docs.docker.com. Replace the markdownify+shortcode round-trip with the rendered HTML inline, matching the styling of the experimental shortcode but with no Markdown re-parse. Fixes docker#25215
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
⏱️ PR Review Timed Out — The review agent hit the 1800 s time limit before completing. This usually happens on large or complex diffs. You can re-trigger with |
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.
Fixes #25215.
Summary
CLI reference pages with
experimental: trueorexperimentalcli: true(e.g.docker pass) render an HTML fragment as a literal code block instead of the styled experimental notice:Root cause
layouts/cli.htmlproduces the experimental notice by feeding a string containing the{{% experimental %}}shortcode throughmarkdownify. The shortcode template embeds the icon partial. After the recent migration to multi-line Heroicons SVGs (commit ee71c80), the inner<path>line and the trailing</span>/<strong>Experimental</strong>lines end up at ≥4-space indent inside the expanded HTML — at which pointmarkdownifyre-parses them as a Markdown indented code block.The Material Symbols icons in use before that migration were single-line SVGs, so the same template produced single-line indented HTML and the bug stayed dormant.
Fix
Replace the
markdownify+shortcode round-trip with the rendered HTML inline, matching the styling of theexperimentalshortcode but with no Markdown re-parse. No new content, just template rendering.Affected pages (27)
All pages where the data file sets
experimental: trueorexperimentalcli: true:docker passand subcommands,docker scoutpolicy/environment/compare/stream/vex/attestation,docker checkpoint,docker manifest,docker buildx debug.Verification
Built the site locally with
docker compose upand confirmed the broken<pre><code></span>...block on/reference/cli/docker/pass/is replaced by the proper styled callout with the beaker icon, Experimental heading, and explanatory paragraphs.The Markdown export path (
cli.markdown.md, used by View Markdown / Copy Markdown) was already correct and is untouched.