fix(playground): ensure local playground is initialized
This commit is contained in:
parent
bd6aa2be2b
commit
5bd0d11982
2 changed files with 9 additions and 4 deletions
|
|
@ -71,6 +71,11 @@
|
|||
<script>LANGUAGE_BASE_URL = "";</script>
|
||||
<script src=tree-sitter.js></script>
|
||||
<script src=playground.js></script>
|
||||
<script>
|
||||
setTimeout(() => {
|
||||
window.initializePlayground()
|
||||
}, 1)
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
|
|
|
|||
|
|
@ -262,10 +262,10 @@ window.initializePlayground = async function initializePlayground() {
|
|||
: 'node-link anonymous';
|
||||
|
||||
row = `<div class="tree-row">${" ".repeat(indentLevel)}${fieldName}` +
|
||||
`<a class='${nodeClass}' href="#" data-id=${id} ` +
|
||||
`data-range="${start.row},${start.column},${end.row},${end.column}">` +
|
||||
`${displayName}</a> <span class="position-info">` +
|
||||
`[${start.row}, ${start.column}] - [${end.row}, ${end.column}]</span>`;
|
||||
`<a class='${nodeClass}' href="#" data-id=${id} ` +
|
||||
`data-range="${start.row},${start.column},${end.row},${end.column}">` +
|
||||
`${displayName}</a> <span class="position-info">` +
|
||||
`[${start.row}, ${start.column}] - [${end.row}, ${end.column}]</span>`;
|
||||
finishedRow = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue