Skip to content

[general] Update third-party libs generator#1605

Merged
andrewnicols merged 1 commit into
moodle:mainfrom
andrewnicols:thirdpartylibsfix
Jun 4, 2026
Merged

[general] Update third-party libs generator#1605
andrewnicols merged 1 commit into
moodle:mainfrom
andrewnicols:thirdpartylibsfix

Conversation

@andrewnicols
Copy link
Copy Markdown
Member

Docusaurus 3.10 dropped support for HTML-style comments. We must now use React/JSX comments.

Docusaurus 3.10 dropped support for HTML-style comments. We must now use
React/JSX comments.
Copilot AI review requested due to automatic review settings June 4, 2026 13:30
@andrewnicols andrewnicols requested review from a team as code owners June 4, 2026 13:30
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 4, 2026

Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit c86a04e
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6a217dfd4b85370008e0a6e6
😎 Deploy Preview https://deploy-preview-1605--moodledevdocs.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.

@andrewnicols andrewnicols merged commit b527524 into moodle:main Jun 4, 2026
7 of 8 checks passed
@andrewnicols andrewnicols deleted the thirdpartylibsfix branch June 4, 2026 13:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to 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 thread scripts/librarian.mjs
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 */}
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