docs: fix off-by-one hl_lines in apps.md - #3196
Conversation
The tutorial001.py snippet gained an import line, shifting every highlighted line down by one; both blocks referencing it now highlight the intended lines instead of blanks. No-Verification-Needed: doc-only line-number fix
📚 Documentation preview
|
There was a problem hiding this comment.
LGTM — straightforward docs fix bumping two hl_lines specs by one after #3034 added an import to docs_src/apps/tutorial001.py.
What was reviewed:
- Verified both new specs against the current
tutorial001.py:19 22 30 32land on the four lines the "Four moves" prose enumerates (Apps(),@apps.tool,add_html_resource,MCPServer), and23-27covers theget_timebody with theclient_supports_appsbranch discussed under graceful degradation. - Checked the other
hl_linesblocks inapps.md(tutorial002/003) are untouched and unaffected — they include different files.
Extended reasoning...
Overview
Single-file docs change to docs/advanced/apps.md: two hl_lines attributes on snippet-include code blocks are each shifted up by one (18 21 29 31 → 19 22 30 32 and 22-26 → 23-27). Both blocks include docs_src/apps/tutorial001.py, which gained an import line in #3034, shifting every subsequent line down by one.
Security risks
None. This is pure documentation markup — no code, config, or build behavior changes.
Level of scrutiny
Minimal scrutiny is appropriate: the change is mechanical and fully verifiable. I cross-checked the new line numbers against the current docs_src/apps/tutorial001.py and confirmed they highlight exactly the lines the surrounding prose describes — the "four moves" list and the get_time fallback logic. The old numbers landed on blank lines and off-by-one targets, consistent with the PR description.
Other factors
The fix was flagged in review discussion on #3190, and this PR also corrects the second block that shares the same shift. No open reviewer comments on the timeline, no test or coverage implications, and the change follows the existing snippet-highlighting convention in the file.
#3034 added an import line to
docs_src/apps/tutorial001.py, which shifted the highlighted lines in bothapps.mdsnippets that include it — the first block was highlighting four blank lines instead of the "four moves" the prose walks through. Bumps both specs by one.Flagged in #3190 (comment) (the second block wasn't mentioned there but has the same shift).