Skip to content
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

Teach language guesser that .cjs files are javascript #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BPScott
Copy link

@BPScott BPScott commented Jan 3, 2020

Full disclosure: this was an edit straight into Github, I've not tested this.

@nicksrandall
Copy link

I just ran into this as well and came here to make this change. Glad somebody beat me to it!

@BPScott
Copy link
Author

BPScott commented Jan 4, 2022

Taking a hint from the These should probably be added to highlight.js auto-detection. comment, it seems language detection for mjs and cjs extensions were added to highlight.js in v9.17.0 - highlightjs/highlight.js#2298, while unpkg is using 9.15.8.

A better fix would be to update highlight.js, and to remove the mjs line in the extLanguages object.

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