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

Prism syntax highlight 'json' #207

Closed
peterbe opened this issue Oct 28, 2019 · 2 comments
Closed

Prism syntax highlight 'json' #207

peterbe opened this issue Oct 28, 2019 · 2 comments

Comments

@peterbe
Copy link
Contributor

peterbe commented Oct 28, 2019

When processing a bunch of old Kuma docs in the rendererer cli I got a lot of warnings like this:

Looks like a syntax highlighting marker but not found as a Prism plugin: json

I think it comes from here: https://github.com/mdn/stumptown-renderer/blob/d2acf64d528b948ba77e0145efd704f2de3f8fbe/cli/syntax-highlighter.js#L12-L15

@peterbe
Copy link
Contributor Author

peterbe commented Oct 30, 2019

Turns out, this isn't easy. The instructions on prismjs.com for Node and that loadLanguages thing doesn't work. Either way, the cli doesn't care that much about bloat in since it can literally load every possible language that's available inside node_modules/prism/**

@peterbe
Copy link
Contributor Author

peterbe commented Oct 30, 2019

I think the answer is somewhere here: PrismJS/prism#972

Also, this issue just brings up json but I think, skimming the above-mentioned issue, that the solution is to load every possible language that Prism has so it becomes available in the Prism.languages lookup.

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

No branches or pull requests

1 participant