Skip to content

Commit

Permalink
Fix JavaScript highlighting broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Aug 12, 2023
1 parent c305a38 commit 483dedd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scintilla/lexers/LexJavaScript.cxx
Expand Up @@ -286,7 +286,7 @@ void ColouriseJsDoc(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyl
if (lineContinuation) {
lineContinuation = 0;
} else {
sc.SetState((sc.state >= SCE_JSX_STRING_SQ) ? SCE_JSX_OTHER : SCE_JS_DEFAULT);
sc.SetState((sc.state == SCE_JSX_STRING_SQ || sc.state == SCE_JSX_STRING_DQ) ? SCE_JSX_OTHER : SCE_JS_DEFAULT);
continue;
}
}
Expand All @@ -312,7 +312,7 @@ void ColouriseJsDoc(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyl
sc.ChangeState(SCE_JS_KEY);
}
}
sc.SetState((sc.state >= SCE_JSX_STRING_SQ) ? SCE_JSX_OTHER : SCE_JS_DEFAULT);
sc.SetState((sc.state == SCE_JSX_STRING_SQ || sc.state == SCE_JSX_STRING_DQ) ? SCE_JSX_OTHER : SCE_JS_DEFAULT);
continue;
} else if (sc.state == SCE_JS_STRING_BT && sc.Match('$', '{')) {
nestedState.push_back(sc.state);
Expand Down

0 comments on commit 483dedd

Please sign in to comment.