-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Syntax highlighting does not work in 1.9rc2 #7559
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I can see this on try.gitea.io here. I suspect it might be related to the recent jQuery update on the 1.9 branch. |
Seems like some kind of race condition with the highlight. If I do a no-cache reload in Firefox (CTRL-Shift-R), it highlights correctly. |
Thanks for checking that. try.gitea.io was too slow / broken for me to find any actual files yesterday to confirm :( |
i put these in
|
Previously hljs was initialized via a function that relies on the DOMContentLoaded event, registerd after jQuery's 'ready' event. I assume that with the recent jQuery update, DOMContentLoaded may not be guaranteed to fire after 'ready'. Fixed this via vanilla JS initalization. Fixes: go-gitea#7559
* Fix syntax highlight initialization Previously hljs was initialized via a function that relies on the DOMContentLoaded event, registerd after jQuery's 'ready' event. I assume that with the recent jQuery update, DOMContentLoaded may not be guaranteed to fire after 'ready'. Fixed this via vanilla JS initalization. Fixes: #7559 * semicolon
* Fix syntax highlight initialization Previously hljs was initialized via a function that relies on the DOMContentLoaded event, registerd after jQuery's 'ready' event. I assume that with the recent jQuery update, DOMContentLoaded may not be guaranteed to fire after 'ready'. Fixed this via vanilla JS initalization. Fixes: go-gitea#7559 * semicolon
* Fix syntax highlight initialization Previously hljs was initialized via a function that relies on the DOMContentLoaded event, registerd after jQuery's 'ready' event. I assume that with the recent jQuery update, DOMContentLoaded may not be guaranteed to fire after 'ready'. Fixed this via vanilla JS initalization. Fixes: #7559 * semicolon
Hi there, I'm now on 1.9.3 and this issue is still present, highlighting only activates maybe ~ 50% of the time on page loads :( |
Could you try to clean the cache of browser? |
sqlite, sqlite_unlock_notify
[x]
):Description
In this release the code highlighting does not activate when viewing files, even though index.js seems to call it. The
<code>
element ends up with an empty class string and no highlighting occurs.Downgrading to 1.8.3 fixes the problem.
The text was updated successfully, but these errors were encountered: