-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix code display in release blog #3977
Conversation
The problem will come back next time we put an mjs code block in release notes. Node's linter forbids ESM syntax in js blocks |
Best option is probably to add Refs: nodejs/node#37162 We probably don't need anything as elaborate as what's in the docs (with a toggle switch and all that). We probably just need to map |
If it's just the release posts we already remap nodejs.org/scripts/release-post.js Lines 107 to 113 in a654c6b
|
I think we need to do the same thing I did in nodejs/node#37311. |
If I understand correctly, that would fix lint errors but not the display error that we saw here. |
Hum indeed, I misread the issue. It looks like a bug in
I'm able to workaround the issue by adding these lines at the top of const { languages } = require('prismjs');
languages.mjs = languages.js; |
I wonder if maybe the "preLoad" option is also applicable https://www.npmjs.com/package/metalsmith-prism#preload-optional |
Fixes: #3976