Skip to content

Commit

Permalink
Update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed Aug 24, 2024
1 parent d8e3b80 commit 585f697
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- https://github.com/tree-sitter/tree-sitter.github.io/blob/7371e63/tree-sitter.wasm
- Or download those files from https://github.com/tree-sitter/tree-sitter/releases/
-->

<head>
<meta charset="utf-8">
<title>Grammar for comment tags like TODO - tree-sitter-comment</title>
Expand Down Expand Up @@ -45,7 +46,7 @@
</div>

<select id="language-select" style="display: none;">
<option value="comment" selected>Parser</option>
<option value="parser" selected>Parser</option>
</select>
</header>

Expand All @@ -66,10 +67,7 @@
</main>
</div>

<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
crossorigin="anonymous">
</script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clusterize.js/0.18.0/clusterize.min.js"></script>
Expand All @@ -84,12 +82,6 @@
const $codeEditor = document.querySelector('.CodeMirror');
if ($codeEditor) {
$codeEditor.CodeMirror.setValue(codeExample);
// The selected language gets cached from other
// playgrounds for some reason, force it to update.
let languageSelect = document.getElementById('language-select');
languageSelect.value = 'comment';
let changeEvent = new Event('change');
languageSelect.dispatchEvent(changeEvent);
clearInterval(handle);
}
}, 500);
Expand All @@ -108,10 +100,10 @@
</script>

<style>
body {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
}

#playground-container {
width: 100%;
Expand Down Expand Up @@ -143,7 +135,8 @@
flex-direction: column;
}

#code-container, #query-container {
#code-container,
#query-container {
flex: 1;
position: relative;
overflow: hidden;
Expand Down Expand Up @@ -210,6 +203,7 @@

.query-error {
text-decoration: underline red dashed;
-webkit-text-decoration: underline red dashed;
}
</style>
</body>
File renamed without changes.

0 comments on commit 585f697

Please sign in to comment.