File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
1
A,B,C
2
2
a1,b1,c1
3
3
a2,"b,2",c2
4
- a3,b3,c3
4
+ a3,b3,c3
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ scheme = ~[:/?#]+
6
6
auth = ~[/?#]*
7
7
path = ~[?#]*
8
8
query = ~'#'*
9
- frag = ~[ \t\n\r]*
9
+ frag = ~[ \t\n\r]*
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ const examples = (await getCollection("examples")).map(c => c.data)
25
25
const input = document.getElementById('input')
26
26
const parse = parser.parse(input.innerText) //textContent),
27
27
const output = document.getElementById('output');
28
- if (parse.ok) output.textContent = parse.show_ptree(); // TODO json?
28
+ const showJson = document.getElementById<HTMLCheckboxElement>('json').checked
29
+ if (parse.ok) output.textContent = parse.show_ptree(showJson);
29
30
else output.textContent = parse.show_err();
30
31
}
31
32
@@ -93,6 +94,11 @@ const examples = (await getCollection("examples")).map(c => c.data)
93
94
overflow-y: auto;
94
95
}
95
96
97
+ .json {
98
+ display: flex;
99
+ align-items: center;
100
+ }
101
+
96
102
@media (max-width: 768px) {
97
103
body {
98
104
grid-template-areas:
@@ -139,7 +145,12 @@ const examples = (await getCollection("examples")).map(c => c.data)
139
145
<div id =' input' contenteditable =' true' ></div >
140
146
</div >
141
147
<div class =' output' >
142
- <div class =' header' >Parse Tree</div >
148
+ <div class =' header' >Parse Tree
149
+ <label class =" json" >
150
+ JSON
151
+ <input type =" checkbox" id =" json" name =" json" onchange =" run ()" >
152
+ </label >
153
+ </div >
143
154
<div id =' output' ></div >
144
155
</div >
145
156
<div class =" footer" >Copyright 2024</div >
You can’t perform that action at this time.
0 commit comments