Repository navigation
fix: track docs-site ROS2+ROS1 merge and inline section headings - #7
Merged
Merged
Conversation
The docs site restructured docs/intro.mdx again: ROS2 and ROS1 were merged into a single ROS category (one column instead of per-distro columns), and each section's own "### Heading" moved from outside its marker pair to inside it. The former just needed SOFTWARE_SECTIONS updated; the latter was silently producing a duplicate heading (ours, then the leaked upstream one) until extractMarkerBlock now strips a leading heading line from the extracted block regardless of which side of the marker it's on. Refreshed scripts/fixtures/intro.mdx from the live site and updated the test suite's expectations to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ebarnett3
approved these changes
Oct 5, 2026
mbegin-robotiq
approved these changes
Oct 6, 2026
mbegin-robotiq
left a comment
Contributor
There was a problem hiding this comment.
LGTM. One non-blocking suggestion inline about test coverage.
- extractMarkerBlock's heading-strip regex required a trailing
newline after the heading, so a block consisting of nothing but a
heading (reproduced by ebarnett3) passed through unstripped,
leaking a duplicate heading. Fixed per their suggested
/^#{1,6}[^\n]*(\n+|$)/, with a regression test for the exact case.
- Added mbegin-robotiq's suggested assertion to the fixture test:
the existing heading check only matched our own #### lines and
would still pass if a stray upstream ### leaked through alongside
them.
Review feedback from PR #7.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
Author
|
Pushed fixes for both actionable review comments (heading-only edge case + the stronger fixture assertion) in 2253eaa. Filed robotiq/robotiq.github.io#36 for the grammar nits — those are in the live docs page's own text (copied verbatim into the fixture), not something to fix here. |
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.
Problem
The daily update-readme run failed (run):
Correct behavior — the safety check from PR #2 did exactly its job and refused to publish a broken section. The docs site restructured again:
ROScategory (one column, not per-distro).### Headingmoved from outside its marker pair to inside it (previously: heading, blank line,{/* START */}; now:{/* START */}, heading, blank line, table).The second part is a real bug fix, not just a config update: naively updating
SOFTWARE_SECTIONSwithout handling the heading move would have produced a duplicated#### ROS/### ROSpair in the README (confirmed by actually running the regenerator before this fix).Fix
SOFTWARE_SECTIONS: dropROS2/ROS1, add singleROS.extractMarkerBlocknow strips a leading heading line from the extracted block regardless of which side of the marker it's on, sincebuildSoftwareToolsSectionalways supplies its own heading.scripts/fixtures/intro.mdxfrom the live site; updated test expectations to match (new heading list, new product names, new Libraries/ROS paths).Review round 2 (ebarnett3, mbegin-robotiq)
/^#{1,6}[^\n]*(\n+|$)/, with a regression test for exactly that case.assert.doesNotMatch(section, /^#{1,3} /m)) that no stray upstream heading leaks through — the previous check only looked for our own####headings and would've passed even if the strip logic regressed.robotiq.github.iopage, not something this repo controls. Filed as robotiq/robotiq.github.io#36; replied individually on each thread.Test plan
node --test scripts/*.test.mjs)🤖 Generated with Claude Code