[general] Update third-party libs generator#1605
Merged
Merged
Conversation
Docusaurus 3.10 dropped support for HTML-style comments. We must now use React/JSX comments.
✅ Deploy Preview for moodledevdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the third-party libraries credits generator/templates to be compatible with Docusaurus 3.10’s MDX parsing by replacing HTML-style comments with React/JSX comment syntax (used for heading IDs and tooling directives).
Changes:
- Added JSX comment-based heading IDs to third-party libs templates (e.g.
## Libraries {/* #libraries */}). - Updated the librarian generator to emit JSX comment anchors for each library heading.
- Regenerated
general/community/credits/thirdpartylibs.mdto reflect the new anchor/comment style and admonition syntax.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/templates/thirdpartylibs/outdated-header.md.tpl | Adds JSX heading ID for the “Legacy libraries” section. |
| src/templates/thirdpartylibs/other-libraries.md.tpl | Adds JSX heading IDs for “Other libraries” and “MathJax”. |
| src/templates/thirdpartylibs/header.md.tpl | Converts cspell/markdownlint directives to JSX-comment-wrapped form; adds heading ID for “Libraries”. |
| src/templates/thirdpartylibs/footer.md.tpl | Converts cspell:enable directive to JSX-comment-wrapped form. |
| scripts/librarian.mjs | Generates JSX comment anchors for each library heading. |
| general/community/credits/thirdpartylibs.md | Regenerated output reflecting the new anchor/comment/admonition formatting. |
Comment on lines
+149
to
+152
| const libraryAnchor = libraryName.toLowerCase().replace(/\s+/g, '-').replace(/[^a-z\d\-]/g, ''); | ||
|
|
||
| return ` | ||
| ### ${libraryName} | ||
| ### ${libraryName} {/* #${libraryAnchor} */} |
| - **URL**: [https://github.com/googleapis/google-api-php-client](https://github.com/googleapis/google-api-php-client) | ||
|
|
||
| ### Google APIs {/* #google-apis-1 */} | ||
| ### Google APIs {/* #google-apis */} |
| - 2011-2021 The Bootstrap Authors | ||
|
|
||
| ### Twitter Bootstrap {/* #twitter-bootstrap-2 */} | ||
| ### Twitter Bootstrap {/* #twitter-bootstrap */} |
| - 2016 Federico Zivolo and contributors | ||
|
|
||
| ### Popper.js {/* #popperjs-1 */} | ||
| ### Popper.js {/* #popperjs */} |
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.
Docusaurus 3.10 dropped support for HTML-style comments. We must now use React/JSX comments.