Skip to content

Commit

Permalink
Update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed May 8, 2021
1 parent 107b50a commit 5aee336
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<!--
Based on:
- https://github.com/tree-sitter/tree-sitter/blob/bfeec63d/cli/src/web_ui.html#L1
- https://github.com/tree-sitter/tree-sitter/blob/335190c/cli/src/web_ui.html
- https://github.com/ikatyang/tree-sitter-markdown/blob/master/docs/index.html
Assets from:
- https://github.com/tree-sitter/tree-sitter.github.io/blob/da6035e/tree-sitter.js
- https://github.com/tree-sitter/tree-sitter.github.io/blob/da6035e/tree-sitter.wasm
- https://github.com/tree-sitter/tree-sitter/blob/335190c/docs/assets/js/playground.js
- https://github.com/tree-sitter/tree-sitter.github.io/blob/30c344c/tree-sitter.js
- https://github.com/tree-sitter/tree-sitter.github.io/blob/30c344c/tree-sitter.wasm
-->
<head>
<meta charset="utf-8">
Expand Down
2 changes: 1 addition & 1 deletion docs/js/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ let tree;
const startPosition = queryEditor.posFromIndex(error.index);
const endPosition = {
line: startPosition.line,
ch: startPosition.ch + (error.length || 1)
ch: startPosition.ch + (error.length || Infinity)
};

if (error.index === queryText.length) {
Expand Down
2 changes: 1 addition & 1 deletion docs/js/tree-sitter.js

Large diffs are not rendered by default.

Binary file modified docs/js/tree-sitter.wasm
Binary file not shown.

0 comments on commit 5aee336

Please sign in to comment.