@@ -3,19 +3,22 @@ import * as Plot from "@observablehq/plot";
3
3
export async function treeDelimiter ( ) {
4
4
return Plot . plot ( {
5
5
axis : null ,
6
- height : 120 ,
6
+ height : 150 ,
7
7
margin : 10 ,
8
8
marginLeft : 40 ,
9
9
marginRight : 190 ,
10
10
marks : [
11
11
Plot . tree (
12
12
[
13
- "foo;bar;https://example.com" ,
14
- "foo;bar;https://example.com/posts/1" ,
15
- "foo;baz;https://example.com/posts/2" ,
16
- "foo;bar\\;baz;https://example2.com" , // “bar;baz” should be a single node
17
- "foo;bar/baz;https://example4.com" , // "bar/baz" should be a single node, distinct from “bar;baz”
18
- "foo;bar\\/baz;https://example3.com" // “bar\/baz” should be a single node
13
+ "foo;a;//example" , // foo → a → //example
14
+ "foo;a;//example/1" , // foo → a → //example/1
15
+ "foo;b;//example/2" , // foo → b → //example/2
16
+ "foo;c\\;c;//example2" , // foo → c;c → //example2
17
+ "foo;d\\\\;d;//example2" , // foo → d\ → d → //example3
18
+ "foo;d\\\\;\\d;//example2" , // foo → d\ → \d → //example3
19
+ "foo;e\\\\\\;e;//example2" , // foo → e\;e → //example3
20
+ "foo;f/f;//example4" , // foo → f/f → //example4
21
+ "foo;g\\/g;//example3" // foo → g\/g → //example3
19
22
] ,
20
23
{ delimiter : ";" }
21
24
)
@@ -26,21 +29,22 @@ export async function treeDelimiter() {
26
29
export async function treeDelimiter2 ( ) {
27
30
return Plot . plot ( {
28
31
axis : null ,
29
- height : 120 ,
32
+ height : 150 ,
30
33
margin : 10 ,
31
34
marginLeft : 40 ,
32
35
marginRight : 190 ,
33
36
marks : [
34
- Plot . tree (
35
- [
36
- "foo/bar/https:\\/\\/example.com" ,
37
- "foo/bar/https:\\/\\/example.com\\/posts\\/1" ,
38
- "foo/baz/https:\\/\\/example.com\\/posts\\/2" ,
39
- "foo/bar;baz/https:\\/\\/example2.com" , // “bar;baz” should be a single node
40
- "foo/bar\\/baz/https:\\/\\/example4.com" , // "bar/baz" should be a single node, distinct from “bar;baz”
41
- "foo/bar\\\\\\/baz/https:\\/\\/example3.com" // “bar\/baz” should be a single node
42
- ]
43
- )
37
+ Plot . tree ( [
38
+ "foo/a/\\/\\/example" , // foo → a → //example
39
+ "foo/a/\\/\\/example\\/1" , // foo → a → //example/1
40
+ "foo/b/\\/\\/example\\/2" , // foo → b → //example/2
41
+ "foo/c;c/\\/\\/example2" , // foo → c;c → //example2
42
+ "foo/d\\\\/d/\\/\\/example2" , // foo → d\ → d → //example3
43
+ "foo/d\\\\/\\d/\\/\\/example2" , // foo → d\ → \d → //example3
44
+ "foo/e\\\\;e/\\/\\/example2" , // foo → e\;e → //example3
45
+ "foo/f\\/f/\\/\\/example4" , // foo → f/f → //example4
46
+ "foo/g\\\\\\/g/\\/\\/example3" // foo → g\/g → //example3
47
+ ] )
44
48
]
45
49
} ) ;
46
50
}
0 commit comments