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

Warning in console when using CodePane #1137

Closed
AlbertBrand opened this issue Jul 1, 2022 · 1 comment · Fixed by #1150
Closed

Warning in console when using CodePane #1137

AlbertBrand opened this issue Jul 1, 2022 · 1 comment · Fixed by #1150
Assignees
Labels
🐛 Bug Issues or PRs that report or fix a bug

Comments

@AlbertBrand
Copy link

What version of Spectacle are you using? (can be found by running npm list spectacle)
9.2.1

What version of React are you using? (can be found by running npm list react)
18.2.0

Describe the Problem

Check the console when using a CodePane:

Warning: React does not recognize the `lineNumberProps` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `linenumberprops` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This is triggered by the upgrade of react-syntax-highlighter, they have dropped lineNumberProps in newer versions.
Interestingly it doesn't seem to cause problems with highlighting in theCodePane.

@carloskelly13 carloskelly13 added the 🐛 Bug Issues or PRs that report or fix a bug label Jul 19, 2022
@mwritter mwritter self-assigned this Jul 19, 2022
@mwritter
Copy link
Contributor

Looks like this was due to a regression in react-syntax-highlighter, and also looks like a fix was started but not finished.
react-syntax-highlighter/react-syntax-highlighter#311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Issues or PRs that report or fix a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants