gatsby
gatsby copied to clipboard
feat(gatsby-remark-prismjs): Expose Full Line-Length Diff Highlighting
Description
@stephencweiss puts the issue fairly succinctly in this comment and the next
This PR aims to fix the issue of not only supporting diff languages but also supporting the last step of adding the diff-highlight class to the code blocks which, along with Prisms stylesheet, will take the best-supported diff-viewing-experience currently available:
To a cleaner, full line-length highlighted alternative:
Documentation
Updated the README for the newly exposed configuration open. I defaulted it to false although I don't think there's any backwards compatibility immediately broken if set to true (without adding the stylesheet to gatsby-browser, the resulting visual is the same as current)
Related Issues
Fixes #20630
I don't think I'm qualified to actually review whether this works or not (and unfortunately, it looks like there's a failing test), but I'm so excited for this to land! @jon-sully - 1. thank you! 2. please let me know how I can help with the tests.
Thanks for the kind words! Happy to help :) It's running great on my blog so I'll be excited to see it go live (hopefully!).
I don't think there are actually any failing tests and I did run the test suite locally with no failures; the CircleCI build is unfortunately failing for what seems like completely tangential reasons? Not sure why that would be happening, but may request maintainer support on that.
Hi, any news??
Hey @iicdii, thanks for the bump! I'd actually forgotten about this one. I'll jump back on it soon 🙂
FYI, this PR is still working fine on the latest versions of Gatsby. I wrote a blog post about the patch I'm using to apply it to the latest release of gatsby-remark-prismjs.