Bug | Highlighting might not clear after disposal
Closed this issue · 1 comments
HaimCandiTech commented
In rare cases where there was a change in monaco's content after disposal of highlightOnDidChangeModelContent
The highlight might stay there
Steps to reproduce:
- Set up monaco with JSX highlight library
- Register to highlightOnDidChangeModelContent
- Update monaco value (change from
<></>
to<div></div>
- Immediately call highlightOnDidChangeModelContent's dispose function
Expected Result:
No highlight
Result:
Incorrect highlight will be shown for the name of the JSX element
How to fix:
Add clearTimeout(tid);
as the first line of:
syntax-highlighter/src/core/MonacoJSXHighlighter.js
Lines 230 to 242 in 28984b6
luminaxster commented
Thank you so much, I will fix this and #22 next weekend.