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
Improve highlightjs usage to prevent report from lagging/crashing #527 #533
Conversation
I got it fixed. Just check if my fixes are correct. 😀 |
For your preliminary testing, please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! 💯 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, much faster now 💯 👍 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellante 👍
frontend/src/static/js/main.js
Outdated
const element = ele; | ||
const fileExtension = binding.value.split('.').pop(); | ||
|
||
element.className = fileExtension; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit, just set element.className to binding.value.split dun need make new var
I think HighlightJS doesn't highlight the syntax for subsequent contributor now: Let's say there are 2 contributor A and B. Upon opening's A code panel it highlights the syntax but it doesn't highlight B's code panel. Is it caused by this PR? |
@emer7 I am unable to replicate this. Would need you to provide more details. Note that |
Found it, turns out that problem itself is fixed by this PR. Sorry for the false alarm |
Fixes #527