Skip to content

fix(docs): skip nested example fences - #307

Open
thomhurst wants to merge 1 commit into
mainfrom
docs-skip-nested-fences
Open

fix(docs): skip nested example fences#307
thomhurst wants to merge 1 commit into
mainfrom
docs-skip-nested-fences

Conversation

@thomhurst

@thomhurst thomhurst commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • consume non-target fenced blocks before scanning resumes
  • prevent nested documentation examples from being compiled as public snippets

Follow-up to #306.

Validation

  • ./scripts/Verify-DocSnippets.ps1 -PackagesPath artifacts/package/release -Version 0.0.0-docs

Summary by CodeRabbit

  • Bug Fixes
    • Improved documentation snippet processing to correctly handle Shell and PowerShell code blocks.
    • Prevented duplicate or unintended processing of these code blocks during validation.

@thomhurst
thomhurst deployed to Pull Requests August 21, 2026 14:38 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7888e1ab-d82a-4b34-999e-406449b1f278

📥 Commits

Reviewing files that changed from the base of the PR and between a166cd6 and f95035a.

📒 Files selected for processing (1)
  • scripts/Verify-DocSnippets.ps1

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The documentation snippet verifier now continues the outer scan after processing shell and PowerShell fences. The generic fence-content loop handles only other fence types.

Changes

Documentation snippet verification

Layer / File(s) Summary
Shell fence control flow
scripts/Verify-DocSnippets.ps1
The script skips the generic fence-content loop after processing shell-like fences. Other fence types continue through the generic loop.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to f9503

This localized documentation-validation change skips nested example fences without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Poem

I’m a small rabbit with a tidy scan,
Shell fences hop past the generic plan.
PowerShell follows, neat and bright,
Other fences stay on the right.
No double paths beneath the moon—
Clean docs checks finish soon!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation fence-processing fix implemented in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-skip-nested-fences

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates documentation-snippet traversal so non-target fenced blocks are consumed as a unit, preventing nested examples from being interpreted as public snippets.

  • Continues immediately after processing target C# and shell fences.
  • Skips the complete contents of other fenced blocks before resuming the scan.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

The parser reuses the opening fence’s character and minimum delimiter length while advancing past non-target blocks, and the current documentation inputs do not expose a conflicting traversal case.

Important Files Changed

Filename Overview
scripts/Verify-DocSnippets.ps1 Adds delimiter-aware consumption of non-target fenced blocks; no actionable defect was found in the current documentation inputs.

Reviews (1): Last reviewed commit: "fix(docs): skip nested example fences" | Re-trigger Greptile

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.

1 participant