You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug highlight-line-numbers causing commented code on uncommented code
To Reproduce
Steps to reproduce the behavior:
I'm developing nextjs app
importing highlight.js lazy loading using NodeJS import()
importing highlightjs-line-numbers.js lazy loading using NodeJS
calling hljs.highlightBlock then hljs.lineNumbersBlock
first render is no problem
if the component did re-render, which also calls again hljs.highlightBlock and hljs.lineNumbersBlock it broke the highlighting
** Problem **
code that is not a commented recognized as comment
happens on any code language
Expected behavior highlight-line-numbers should not modify highlighting done by highlight.js for the subsequent calls
Screenshots
Desktop (please complete the following information):
OS: MacOS
Browser: Chrome
Version: 88.0.4324.150 (Official Build) (x86_64)
Additional context
I know I can prevent re-calling the method by tracking if it has been called or not. But I also have cases when this is not possible.
The text was updated successfully, but these errors were encountered:
Describe the bug
highlight-line-numbers
causing commented code on uncommented codeTo Reproduce
Steps to reproduce the behavior:
highlight.js
lazy loading using NodeJSimport()
highlightjs-line-numbers.js
lazy loading using NodeJShljs.highlightBlock
thenhljs.lineNumbersBlock
hljs.highlightBlock
andhljs.lineNumbersBlock
it broke the highlighting** Problem **
language
Expected behavior
highlight-line-numbers
should not modify highlighting done byhighlight.js
for the subsequent callsScreenshots
Desktop (please complete the following information):
Additional context
I know I can prevent re-calling the method by tracking if it has been called or not. But I also have cases when this is not possible.
The text was updated successfully, but these errors were encountered: