Skip to content

examples: close the full_code snippet region with an end marker - #2450

Merged
joefernandez merged 3 commits into
google:mainfrom
AAliKKhan:fix/snippet-region-end-marker
Oct 23, 2026
Merged

joefernandez merged 3 commits into
google:mainfrom
AAliKKhan:fix/snippet-region-end-marker

Conversation

@AAliKKhan

Copy link
Copy Markdown
Contributor

Problem

LongRunningFunctionExample.java opens its full_code region on line 3 but
never closes it — line 164 repeats a start marker instead of ending with
end:

// --8<-- [start:full_code]     // line 3
...
}
// --8<-- [start:full_code]     // line 164  <- should be [end:full_code]

The region is consumed by docs/tools-custom/function-tools.md:806.

The published output is correct by accident: the stray marker is the last
line of the file, so pymdownx.snippets runs an unterminated region to
end-of-file and the marker line itself is excluded. Anything appended below it
would silently be pulled into the published code block.

Fix

[start:full_code] -> [end:full_code] on line 164.

Verification

  • a structural scan of all 150 files / 612 region markers under
    examples/ reports exactly two problems — a duplicate start and a
    start with no end, both on this line — and 0 after the fix
  • the rendered include is byte-identical before and after (5228 chars),
    produced by rendering the same --8<-- directive against the main copy of
    the file and the fixed copy
  • mkdocs build --strict on the union of this round's five branches:
    exit 0, 0 warnings

The region opened on line 3 is never closed - line 164 repeats [start:], so
pymdownx.snippets runs the include to end-of-file. The rendered output is
identical today only because the marker sits after the last line of code, so
anything appended to this file would silently be pulled into the published
code block. Every other example file closes its regions with [end:].
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 1363daf
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6adb64ecfecf5060c668f1dd
😎 Deploy Preview https://deploy-preview-2450--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@joefernandez
joefernandez enabled auto-merge (squash) October 23, 2026 13:43
@joefernandez
joefernandez merged commit cb11268 into google:main Oct 23, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants