Repository navigation
fix(options): keep OPTION-block figures nested in the list item (#2820) - #2842
Merged
Merged
Conversation
Rollout script's 404-detection bug created this file on a repo that should not have it (wrong type, or a non-tutorial/template/platform repo). Reverting to restore the intended per-repo notify-workflow layout.
Rollout script's 404-detection bug created this file on a repo that should not have it (wrong type, or a non-tutorial/template/platform repo). Reverting to restore the intended per-repo notify-workflow layout.
Bump deploy versions for the DEV->main promotion: - .deploy/mta.yaml 1.40.0 -> 1.40.1 (main tutorials-ims MTA) - mta-mcp.yaml 1.0.0 -> 1.0.1 (tutorials-mcp MTA) Patch release — 6 fixes/docs merged to DEV since 1.40.0 (#2820/#2826, #2827/#2830, #2828/#2831, #2800/#2832, docs #2829). Refresh the What's New digest (hugo/data/whats_new.json) with the 7 PRs since the last release. No user-facing features in this window; all changes are fixes, reliability hardening, and author docs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
release: v1.40.1 (DEV→main promotion)
convertOptionBlocks spliced OPTION shortcodes flush-left, which closed the surrounding numbered list. Figures inside an os-panel — or trailing an OPTION group in the same substep — then rendered as a top-level <figure> sibling of the list, losing their indentation under the substep (the 'centered vs left-aligned image' QA report). PR #2822 only adjusted figure text-align (CSS), which cannot re-nest a DOM sibling, so the figures stayed un-indented. Approach A: indent the shortcode WRAPPER lines to the substep so the block stays inside the <li> (list never closes), while the panel BODY stays at column 0 so os-panel.html's markdownify pass parses code fences/images as markdown (preserves the #2703 behaviour). The old flush-left tail-dedent is removed — with the list open, trailing content keeps its substep indent. Verified through real Hugo renders (incl. the live Tutorials-Contribution hana-clients-install source): figures nest as li > ol > figure; #2703 code fences unaffected. New render-level regression test added.
This was referenced Oct 19, 2026
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 & why
Figures inside an
[OPTION]block — or trailing an OPTION group in the same numbered substep — rendered as a top-level<figure>sibling of the list instead of nested in the<li>, so they lost their indentation under the substep. This is the "centered vs left-aligned image" report in #2820 (surfaced on the QA channel where an author is trialing the OS-OPTION feature onhana-clients-install).Root cause:
convertOptionBlocksspliced the OPTION shortcode flush-left, which closes the surrounding markdown list. Anything landing in the column-0 gap (or in the separatelymarkdownify'dos-panelbody) then rendered outside the<li>.#2822 only changed figure
text-align(CSS) — that cannot move a DOM sibling back inside the<li>, which is why the figures looked "fixed" but stayed un-indented.Fix (approach A)
Indent the shortcode wrapper lines to the substep so the block stays inside the
<li>(the list never closes), while the panel body stays at column 0 soos-panel.html's{{ .Inner | markdownify }}still parses code fences/images as markdown (preserves #2703). The old flush-left tail-dedent is removed — with the list open, trailing substep content keeps its authored indent instead of being ejected.Verification
test/unit/option-figure-list-nesting.test.ts— drives author-style[OPTION]markdown through the realconvertOptionBlocks+ real Hugo + realrender-image.html, asserts the figure is nested (li > ol > figure). This is the structural check fix(options): honest missing-OS placeholder + left-align figures after OPTION blocks (#2820) #2822 lacked (a markdown-string assertion cannot catch this).Tutorials-Contribution/hana-clients-install.mdsource (12 os-panels): all four list figures renderinLi=true, inOl=true; no literal code fences.1105parser tests +12OPTION render tests green.Not covered by this PR
End-to-end live QA result requires deploying this to the QA env + a QA rebuild from
--ref DEV(rebuild-content.ymlruns the parser from the dispatch ref). Only then will/tutorials-qa/hana-clients-installchange.Fixes #2820