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

Upgrade from @mdx-js/react 1.6.19 to 1.6.20/1.6.21 breaks my syntax highlighting on Docusaurus v2 #1320

Closed
HonkingGoose opened this issue Nov 7, 2020 · 1 comment
Labels
🙉 open/needs-info This needs some more info 🐛 type/bug This is a problem

Comments

@HonkingGoose
Copy link

HonkingGoose commented Nov 7, 2020

Subject of the issue

I was prompted to upgrade to @mdx-js/react v1.6.21 via the Renovate bot.
When I looked at my preview on Netlify, I noticed that my syntax highlighting is now broken where it worked before.
I manually installed @mdx-js/react v1.6.20 and that version also has this bug.

Things are working fine on version 1.6.19.

Your environment

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working and simplified example.

This is working fine: https://git-gosling.netlify.app/docs/best_practices/split_up_your_commits
The pull request preview for mdx-js/react 1.6.21 shows: https://deploy-preview-82--git-gosling.netlify.app/docs/best_practices/split_up_your_commits

  1. Clone https://github.com/RoostingGeese/git-gosling
  2. Stay on the main branch.
  3. git checkout c29382e to checkout the commit before I made further changes.
  4. git switch -c reproduction_branch to create a branch to work on.
  5. yarn install to install set of working dependencies.
  6. yarn start to make a build and open a browser window
  7. Click on the "docs` section in the top navbar.
  8. Go to "Best practices - > Split up your commits" section of the web page, see black code block background, and red/green colors.
  9. Stop dev server with CTRL + C in the CLI.
  10. Run yarn upgrade-interactive --latest, and select the @mdx-js/react package with the spacebar, and confirm with enter.
  11. Run yarn start again, make a dev build with the updated version.
  12. Go to "Best practices - > Split up your commits" section, see gray code block background, syntax highlighting gone.

🎉 BONUS POINTS for creating a minimal reproduction and uploading it to GitHub. This will get you the fastest support. 🎉

Expected behavior

What should happen?
Syntax highlighting style stays the same when upgrading.

working_properly_prior_to_upgrade

Actual behavior

What happens instead?

Syntax highlighting is broken.

broken_on_mdx_upgrade

@HonkingGoose HonkingGoose added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Nov 7, 2020
@HonkingGoose HonkingGoose changed the title Upgrade to @mdx-js/react to v1.6.20 breaks my syntax highlighting on Docusaurus v2 Upgrade from @mdx-js/react 1.6.19 to 1.6.20/1.6.21 breaks my syntax highlighting on Docusaurus v2 Nov 7, 2020
@HonkingGoose
Copy link
Author

I managed to fix this somehow by updating other dependencies, see HonkingGoose/git-gosling#85 for the changes I made that got it working again.

I have no clue what the real underlying problem is nor what package caused the problem. 😕
At least it's fixed now. 🎉

Closing this issue as my problem cannot be cleanly reproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙉 open/needs-info This needs some more info 🐛 type/bug This is a problem
Development

No branches or pull requests

1 participant