-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Syntax highlighting working only on first occasion #1301
Comments
Hi! Can you provide on online example reproducing the issue, so that we can investigate, please? |
For example, in this page - https://www.w3resource.com/python/python-list.php. |
This is caused by #1181. You need to update to the latest version. |
Well, I did update to the latest version of Prism. It's PrismJS 1.11.0 (and corresponding css file is also updated). But the issue is yet to be fixed. |
Are you sure you don't have some sort of cache? I just tested the link you gave in Chrome 64 on Windows 7 and could not reproduce this issue. (Unfortunately I did not have the chance to test it before you made the update, so I can't tell for sure the issue was reproduced before that point.) |
Well, write you are. We have Cloudfare Cache. I am in Dev mode now and I see it is working. But, but, |
From the "redownload" URL that appears at the top of your |
Yeah, I'm not seeing the plugins in the JS served on your site. |
Ok. Let me try it once again. |
Strange problem. I actually select those two plugins. But since I can't see the download js and download css buttons, I have to select, copy and paste both js and css code manually. May be it is missing some code in the process. |
The download page produces a URL with everything you selected. Could you share that here? |
Where it is? I found a button for downloading js but no button for css. |
In the CSS & JS files on the download page, you see the Prism version and a URL underneath it. That's the one I'm asking for. |
Alright, this looks good to me. This is the content you need to download. You said you could not see the download buttons, why is that? |
No idea. It comes when I load that url and disappears immediately. |
Is it something that happens on one browser only or on all of them? Did you have the chance to try? |
I tried both FF and Chrome. Both. Same. |
This is really weird... I can't reproduce in any of them. If you manage to find any clue that could help us understand this new issue, please let us know! (Maybe an extension that you would have on both browsers? An antivirus thing maybe?) Did you manage to copy-paste the code to make your page work properly again? |
Nope. I think when I copy I am missing some code. So Line numbers are not coming. |
Here you go: prism.zip |
Perfect. It worked. Thanks a ton. May I close this issue? |
Glad this is fixed. I'll close the issue. If you happen to understand the cause for the disappearing buttons, please let us know. |
I am using PrismJS on my website for code blocks. Issue is, on Chrome on Windows 7, Syntax highlighting and line numbering working only on first occasion, so for next code blocks, it is not working. Surprisingly, it is working on Ubuntu + Chrome, Ubuntu + FF, Win 7 + FF. But since a lot of users use Chrome + Win 7, it is very odd looking. Any fix?
The text was updated successfully, but these errors were encountered: