-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fixed syntax errors coming from prismjs #32
base: master
Are you sure you want to change the base?
Conversation
I've been hitting #12 and looking for a fix. Found your PR linked from the issue. This PR has a bunch of whitespace/reformatting changes that are distracting from the actual fix (and probably making it less likely the repo maintainer is going to look at the PR). Is this the meaningful part of your change: index.js
prism-config.js
Is there more? |
I've applied just the above locally and confirmed it works to suppress the messages. With one edit: no need to assign prism-config.js
|
Yes, you're right :/ and this was all I changed |
On the console you'll see a lot of errors like this: > Uncaught SyntaxError: Unexpected token o in JSON at position 1 The reason for that can be found here: PrismJS/prism#1303 This PR applies the recommended fix for that thread and also tried with this PR: conorhastings#32 The fix is to add a prism-config.js that sets `disableWorkerMessageHandler: true` Fixes conorhastings#12
On the console you'll see a lot of errors like this: > Uncaught SyntaxError: Unexpected token o in JSON at position 1 The reason for that can be found here: PrismJS/prism#1303 This PR applies the recommended fix for that thread and also tried with this PR: conorhastings#32 The fix is to add a prism-config.js that sets `disableWorkerMessageHandler: true` Fixes conorhastings#12
Created a PR that applies the minimal change: #34 |
It didn't help me. I still get an error. Are you sure it works? |
Hi, it worked for me JSON syntax error in debugging mode as above. And also in jest, it was throwing an error. |
I didn't understand what you mean. The code given is throwing an debug error. |
Are we talking about the same error? |
yes |
Did you apply the whole change or just add those lines to your project? |
@KonstantinZhukovskij you're altering the module itself but dist file doesn't have the changes you made. You can put the src folder inside your app and add react-syntax-highlighter as dependecy. But you are going to have import error, you need to change them.
|
Hello,
This is related to the this issue
Logs appears in debugging mode.
Note: Also there are some vulnerabilities that can be fixed with npm audit.
Could you please review?