Skip to content

Commit 137925d

Browse files
Fix syntax highlighting and evaluation when loading example from URL query parameter
Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
1 parent a9c3fda commit 137925d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • samples/language-service-sample

samples/language-service-sample/app.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -596,13 +596,6 @@ require(['vs/editor/editor.main'], function () {
596596
}, 2000);
597597
});
598598

599-
// Initialize
600-
applyHighlighting();
601-
evaluate();
602-
603-
// Load example from URL query parameter if present
604-
loadExampleFromUrl();
605-
606599
// Event listeners for changes
607600
expressionModel.onDidChangeContent(() => {
608601
applyHighlighting();
@@ -612,4 +605,11 @@ require(['vs/editor/editor.main'], function () {
612605
contextModel.onDidChangeContent(() => {
613606
evaluate();
614607
});
608+
609+
// Initialize - apply highlighting and evaluate for initial content
610+
applyHighlighting();
611+
evaluate();
612+
613+
// Load example from URL query parameter if present (after event handlers are set up)
614+
loadExampleFromUrl();
615615
});

0 commit comments

Comments
 (0)