fix: track docs-site ROS2+ROS1 merge and inline section headings - #7
bcastets-robotiq wants to merge 1 commit into
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>
| // format, inside as of the Libraries/ROS/Simulation restructure) — strip | ||
| // a leading heading line either way, since buildSoftwareToolsSection | ||
| // always supplies its own heading and a leaked one would duplicate it. | ||
| return m[1].trim().replace(/^#{1,6}[^\n]*\n+/, '').trim(); |
There was a problem hiding this comment.
Nit (scripts/update-readme.mjs:98): the heading strip only works if a newline follows the heading. The outer regex already consumes the \n before END, so a block containing only a heading comes through unchanged. The README would then get #### X followed by ### X. I reproduced this with a test string. It can't happen today because the generator always writes a No ... documented yet. line, so it's low priority. A possible fix is /^#{1,6}[^\n]*(\n+|$)/, plus a test case.
| Lots of software tools are available to work with `Robotiq` products. Some of | ||
| those tools are developed and maintained by `Robotiq` and some other by the | ||
| community of developers. |
There was a problem hiding this comment.
Grammar: "and some other by the community of developers" → "and others by the developer community". Suggest: "Many software tools are available for working with Robotiq products. Some are developed and maintained by Robotiq, others by the developer community." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| You will find in this documentation website the documentation for the software | ||
| tools developed and maintained by `Robotiq` as well as reference to the | ||
| software tools developed by the community. |
There was a problem hiding this comment.
Grammar: "You will find in this documentation website the documentation for … as well as reference to the software tools developed by the community" is awkward ("reference" is also missing an article). Suggest: "This site documents the software tools developed and maintained by Robotiq and references those developed by the community." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| For details about `Robotiq` product hardware, please refer to the corresponding | ||
| Hardware manual available on [Robotiq support website](https://robotiq.com/support). |
There was a problem hiding this comment.
Grammar: missing "the" before "Robotiq support website", and "Hardware" shouldn't be capitalized. Suggest: "…please refer to the corresponding hardware manual on the Robotiq support website." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| This site has a sitewide **Stable / Development (main)** switcher, at the | ||
| top of every page, covering every `Robotiq`-maintained tool. **Stable** is |
There was a problem hiding this comment.
Minor: "a sitewide … switcher, at the top of every page, covering every…" reads better as "a sitewide Stable / Development (main) switcher at the top of every page that covers every Robotiq-maintained tool." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| it always tracks that tool's newest tagged release, and is the only | ||
| version this site makes any compatibility commitment about. |
There was a problem hiding this comment.
Minor: "the only version this site makes any compatibility commitment about" → "the only version for which this site makes any compatibility commitment." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| ## Software tools | ||
|
|
||
| Badge colors indicate who maintains the integration:  an official Robotiq-maintained driver,  a community-maintained project. | ||
| Here below is a summary about available tools. |
There was a problem hiding this comment.
Grammar: "Here below is a summary about available tools." → "Below is a summary of the available tools." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
| Here below is a summary about available tools. | ||
|
|
||
| ### Libraries | ||
| Badge colors indicate who maintains the integration:  an official `Robotiq` maintained driver,  a community-maintained project. |
There was a problem hiding this comment.
Missing hyphen: "an official Robotiq maintained driver" → "an official Robotiq-maintained driver" (matches the "Robotiq-maintained" spelling on line 23). This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.
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).Test plan
node --test scripts/*.test.mjs)🤖 Generated with Claude Code