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

README.md link to supported langages broken (includeLangs.js) #190

Closed
slorber opened this issue Apr 19, 2023 · 4 comments
Closed

README.md link to supported langages broken (includeLangs.js) #190

slorber opened this issue Apr 19, 2023 · 4 comments

Comments

@slorber
Copy link
Contributor

slorber commented Apr 19, 2023

Multiple links in the README are now broken.

By default prism-react-renderer only includes an arbitrary subset of the languages that Prism supports. You can add support for more by including their definitions from the main prismjs package:

This library tokenises code using Prism and provides a small render-props-driven
component to quickly render it out into React. This is why it even works with
React Native! It's bundled with a modified version of Prism that won't pollute
the global namespace and comes with
a couple of common language syntaxes.

This is the language that your code will be highlighted as. You can see a list
of all languages that are supported out of the box here.

We also used this link on the Docusaurus website and looking for a replacement, do you have any to suggest?

facebook/docusaurus#8904

@carloskelly13
Copy link
Contributor

@slorber Hi 👋 The languages are at https://github.com/FormidableLabs/prism-react-renderer/blob/master/packages/generate-prism-languages/index.ts#L9-L24.

Those are the top-level languages. Any dependent languages from that list are also included. Dependents are identified by PrismJS. For example jsx will also include js.

@slorber
Copy link
Contributor Author

slorber commented May 12, 2023

Thanks @carloskelly13 🙏

@ustun-ed
Copy link
Contributor

@carloskelly13 is there a particular reason JSON is not in that default bundle? I can open a new issue if it is an oversight.

@ustun-ed
Copy link
Contributor

Also opened a PR to fix the broken links: #207

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

3 participants