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 plugin bugfix alt #1491
Prism plugin bugfix alt #1491
Conversation
Default behavior remains as before, to use a class='language-*' prefix. New behavior allows for a data-language=* alternate. Snapshot tests added.
Deploy preview failed. Built with commit d30d1c6 https://app.netlify.com/sites/using-styled-components/deploys/5967ca60424ef24a53a899dc |
Deploy preview ready! Built with commit d30d1c6 |
Deploy preview ready! Built with commit d30d1c6 |
Deploy preview ready! Built with commit d30d1c6 |
Look at @KyleAMathews, being mr negativity there. @gatsbybot says "preview ready!" but Kyle says "preview failed!" 🤡 |
options: { | ||
// Class prefix for <pre> tags containing syntax highlighting; | ||
// Defaults to 'language-'. | ||
// If you use Prism directly within your site, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps rewrite this sentence slightly so makes clear this option is only needed when loading prismjs into the browser and this is not very common.
I'd vote for this option as not a lot of people know how to write css targeting data attributes (I'd have to look it up) where modifying the class is a simple find/replace. |
Sure. Sounds reasonable. My only concern with this was the similarity (in API) to Prism's own custom-class approach (which has a different implementation/impact). I'll tidy up the comment momentarily. Not sure what's up with CI. Looks like an NPM mirror was down or something. |
Okay! Comments updated. Tested once more locally to confirm the fix. 😄 Let me know if there's anything else needing to be done. |
Sweet! Merging and will be making a new release shortly.
it's remarkable how often CI and building gatsby example sites fail due to random cloud outages. We're building on a castle of cards. |
Hiya @bvaughn! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
That's a nice gesture. Thanks, Jason. |
Alternate option for #1488, also resolves issue #1486