2019-08-31 14:06:30 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2019-09-30 03:01:55 -04:00
|
|
|
|
2019-08-31 14:06:30 -04:00
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
2021-03-14 06:37:55 -04:00
|
|
|
<link rel="stylesheet" href="assets/tree-sitter-playground-0.19.3/style.css" media="screen" type="text/css">
|
2019-08-31 14:06:30 -04:00
|
|
|
<title>Tree-sitter YAML Playground</title>
|
|
|
|
</head>
|
|
|
|
|
2019-09-30 03:01:55 -04:00
|
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<main id="main-content">
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.css">
|
2019-08-31 14:06:30 -04:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/clusterize.js/0.18.0/clusterize.min.css">
|
2019-09-30 03:01:55 -04:00
|
|
|
<style>
|
|
|
|
.version {
|
|
|
|
font-size: 0.5em;
|
|
|
|
}
|
|
|
|
.credit {
|
|
|
|
font-style: italic;
|
|
|
|
margin-top: 20px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|
2019-08-31 14:06:30 -04:00
|
|
|
|
2021-04-18 02:25:59 -04:00
|
|
|
<h1><a href="https://github.com/ikatyang/tree-sitter-yaml">Tree-sitter YAML</a> <span class="version">v0.5.0</span></h1>
|
2019-08-31 14:06:30 -04:00
|
|
|
|
|
|
|
<div id="playground-container" style="visibility: hidden;">
|
|
|
|
|
|
|
|
<h4>Code</h4>
|
|
|
|
<select id="language-select">
|
|
|
|
<option value="yaml" selected="selected">YAML</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<input id="logging-checkbox" type="checkbox"></input>
|
|
|
|
<label for="logging-checkbox">Log</label>
|
|
|
|
|
2019-09-30 03:01:55 -04:00
|
|
|
<input id="query-checkbox" type="checkbox"></input>
|
|
|
|
<label for="query-checkbox">Query</label>
|
|
|
|
|
2019-08-31 14:06:30 -04:00
|
|
|
<textarea id="code-input">
|
|
|
|
</textarea>
|
|
|
|
|
2019-09-30 03:01:55 -04:00
|
|
|
<div id="query-container" style="visibility: hidden; position: absolute;">
|
|
|
|
<h4>Query</h4>
|
|
|
|
<textarea id="query-input"></textarea>
|
|
|
|
</div>
|
|
|
|
|
2019-08-31 14:06:30 -04:00
|
|
|
<h4>Tree</h4>
|
|
|
|
<span id="update-time"></span>
|
|
|
|
<div id="output-container-scroll">
|
|
|
|
<pre id="output-container" class="highlight"></pre>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2019-09-30 03:01:55 -04:00
|
|
|
<div class="credit">
|
|
|
|
This playground was modified from <a href="https://tree-sitter.github.io/tree-sitter/playground">the official Tree-sitter Playground</a>.
|
2019-08-31 14:06:30 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.45.0/codemirror.min.js"></script>
|
|
|
|
|
2021-04-18 02:25:59 -04:00
|
|
|
<script>LANGUAGE_BASE_URL = "assets/tree-sitter-yaml-0.5.0";</script>
|
2021-03-14 06:37:55 -04:00
|
|
|
<script src="assets/web-tree-sitter-0.19.3/tree-sitter.js"></script>
|
2019-08-31 14:06:30 -04:00
|
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/clusterize.js/0.18.0/clusterize.min.js"></script>
|
2021-03-14 06:37:55 -04:00
|
|
|
<script src="assets/tree-sitter-playground-0.19.3/playground.js"></script>
|
2019-09-30 03:01:55 -04:00
|
|
|
|
2019-08-31 14:06:30 -04:00
|
|
|
<script>
|
2020-10-02 03:58:40 -04:00
|
|
|
((codeExample, queryExample) => {
|
2019-08-31 14:06:30 -04:00
|
|
|
const handle = setInterval(() => {
|
|
|
|
const $codeEditor = document.querySelector('.CodeMirror');
|
2020-10-02 03:58:40 -04:00
|
|
|
const $queryEditor = document.querySelector('#query-container .CodeMirror');
|
|
|
|
const $queryCheckbox = document.querySelector('#query-checkbox');
|
|
|
|
if ($codeEditor && $queryEditor) {
|
2019-08-31 14:06:30 -04:00
|
|
|
$codeEditor.CodeMirror.setValue(codeExample);
|
2020-10-02 03:58:40 -04:00
|
|
|
if (queryExample) {
|
|
|
|
$queryEditor.CodeMirror.setValue(queryExample);
|
|
|
|
if (!$queryCheckbox.checked) $queryCheckbox.click();
|
|
|
|
}
|
2019-08-31 14:06:30 -04:00
|
|
|
clearInterval(handle);
|
|
|
|
}
|
|
|
|
}, 500);
|
2019-09-30 03:01:55 -04:00
|
|
|
})(`---
|
2019-08-31 14:06:30 -04:00
|
|
|
invoice: 34843
|
|
|
|
date : 2001-01-23
|
|
|
|
bill-to: &id001
|
|
|
|
given : Chris
|
|
|
|
family : Dumars
|
|
|
|
address:
|
|
|
|
lines: |
|
|
|
|
458 Walkman Dr.
|
|
|
|
Suite #292
|
|
|
|
city : Royal Oak
|
|
|
|
state : MI
|
|
|
|
postal : 48046
|
|
|
|
ship-to: *id001
|
|
|
|
product:
|
|
|
|
- sku : BL394D
|
|
|
|
quantity : 4
|
|
|
|
description : Basketball
|
|
|
|
price : 450.00
|
|
|
|
- sku : BL4438H
|
|
|
|
quantity : 1
|
|
|
|
description : Super Hoop
|
|
|
|
price : 2392.00
|
|
|
|
tax : 251.42
|
|
|
|
total: 4443.52
|
|
|
|
comments: >
|
|
|
|
Late afternoon is best.
|
|
|
|
Backup contact is Nancy
|
2020-10-02 03:58:40 -04:00
|
|
|
Billsmer @ 338-4338.`, ``);
|
2019-08-31 14:06:30 -04:00
|
|
|
</script>
|
|
|
|
|
2019-09-30 03:01:55 -04:00
|
|
|
</main>
|
|
|
|
</div>
|
2019-08-31 14:06:30 -04:00
|
|
|
</body>
|
|
|
|
</html>
|
2019-09-30 03:01:55 -04:00
|
|
|
|
|
|
|
<script
|
|
|
|
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
|
|
|
crossorigin="anonymous">
|
|
|
|
</script>
|