Skip to content

Commit 2b9a2df

Browse files
authored
📝 Improve the user guide Template snippet chapter code display (#15402)
#15345
1 parent 9a89a0e commit 2b9a2df

4 files changed

Lines changed: 136 additions & 139 deletions

File tree

app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201204184532-3qm9l8n.sy

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": "20201204184532-3qm9l8n",
77
"title": "Template snippet",
88
"type": "doc",
9-
"updated": "20250331163727"
9+
"updated": "20250801152837"
1010
},
1111
"Children": [
1212
{
@@ -57,7 +57,7 @@
5757
"HeadingLevel": 2,
5858
"Properties": {
5959
"id": "20210104091444-jy56z0p",
60-
"updated": "20250331163727"
60+
"updated": "20250801152821"
6161
},
6262
"Children": [
6363
{
@@ -215,7 +215,7 @@
215215
"ListData": {},
216216
"Properties": {
217217
"id": "20210104091444-mwbvc9m",
218-
"updated": "20250331163727"
218+
"updated": "20250801152821"
219219
},
220220
"Children": [
221221
{
@@ -421,7 +421,7 @@
421421
},
422422
"Properties": {
423423
"id": "20210121193829-wfzsf6m",
424-
"updated": "20250331163727"
424+
"updated": "20250801152749"
425425
},
426426
"Children": [
427427
{
@@ -454,19 +454,20 @@
454454
"Properties": {
455455
"id": "20241213215602-dk7iion",
456456
"style": "line-height: 22px;",
457-
"updated": "20250331163727"
457+
"updated": "20250801152749"
458458
},
459459
"Children": [
460460
{
461461
"Type": "NodeCodeBlockFenceOpenMarker",
462462
"Data": "```"
463463
},
464464
{
465-
"Type": "NodeCodeBlockFenceInfoMarker"
465+
"Type": "NodeCodeBlockFenceInfoMarker",
466+
"CodeBlockInfo": "dGVtcGxhdGU="
466467
},
467468
{
468469
"Type": "NodeCodeBlockCode",
469-
"Data": ".action{$today := now | date \"20060102150405\"}\n.action{$blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\"}\n"
470+
"Data": ".action{ $today := now | date \"20060102150405\" }\n.action{ $blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\" }\n"
470471
},
471472
{
472473
"Type": "NodeCodeBlockFenceCloseMarker",
@@ -485,7 +486,7 @@
485486
},
486487
"Properties": {
487488
"id": "20250331163529-vixv1we",
488-
"updated": "20250331163604"
489+
"updated": "20250801152801"
489490
},
490491
"Children": [
491492
{
@@ -517,19 +518,20 @@
517518
"IsFencedCodeBlock": true,
518519
"Properties": {
519520
"id": "20250331163550-2r69a54",
520-
"updated": "20250331163604"
521+
"updated": "20250801152801"
521522
},
522523
"Children": [
523524
{
524525
"Type": "NodeCodeBlockFenceOpenMarker",
525526
"Data": "```"
526527
},
527528
{
528-
"Type": "NodeCodeBlockFenceInfoMarker"
529+
"Type": "NodeCodeBlockFenceInfoMarker",
530+
"CodeBlockInfo": "dGVtcGxhdGU="
529531
},
530532
{
531533
"Type": "NodeCodeBlockCode",
532-
"Data": ".action{getBlock \"20250331163529-vixv1we\"}\n"
534+
"Data": ".action{ getBlock \"20250331163529-vixv1we\" }\n"
533535
},
534536
{
535537
"Type": "NodeCodeBlockFenceCloseMarker",
@@ -548,7 +550,7 @@
548550
},
549551
"Properties": {
550552
"id": "20210504093232-vukp34t",
551-
"updated": "20241224162810"
553+
"updated": "20250801152807"
552554
},
553555
"Children": [
554556
{
@@ -581,19 +583,20 @@
581583
"Properties": {
582584
"id": "20241213215606-a1mq6zf",
583585
"style": "line-height: 22px;",
584-
"updated": "20241224162810"
586+
"updated": "20250801152807"
585587
},
586588
"Children": [
587589
{
588590
"Type": "NodeCodeBlockFenceOpenMarker",
589591
"Data": "```"
590592
},
591593
{
592-
"Type": "NodeCodeBlockFenceInfoMarker"
594+
"Type": "NodeCodeBlockFenceInfoMarker",
595+
"CodeBlockInfo": "dGVtcGxhdGU="
593596
},
594597
{
595598
"Type": "NodeCodeBlockCode",
596-
"Data": " .action{querySpans \"SELECT * FROM spans LIMIT ?\" \"3\"}\n"
599+
"Data": ".action{ querySpans \"SELECT * FROM spans LIMIT ?\" \"3\" }\n"
597600
},
598601
{
599602
"Type": "NodeCodeBlockFenceCloseMarker",
@@ -612,7 +615,7 @@
612615
},
613616
"Properties": {
614617
"id": "20241213214939-he4wmcd",
615-
"updated": "20241213214939"
618+
"updated": "20250801152813"
616619
},
617620
"Children": [
618621
{
@@ -645,19 +648,20 @@
645648
"Properties": {
646649
"id": "20241213215554-rox3jk7",
647650
"style": "line-height: 22px;",
648-
"updated": "20241213215554"
651+
"updated": "20250801152813"
649652
},
650653
"Children": [
651654
{
652655
"Type": "NodeCodeBlockFenceOpenMarker",
653656
"Data": "```"
654657
},
655658
{
656-
"Type": "NodeCodeBlockFenceInfoMarker"
659+
"Type": "NodeCodeBlockFenceInfoMarker",
660+
"CodeBlockInfo": "dGVtcGxhdGU="
657661
},
658662
{
659663
"Type": "NodeCodeBlockCode",
660-
"Data": " .action{querySQL \"SELECT * FROM refs LIMIT 3\"}\n"
664+
"Data": ".action{ querySQL \"SELECT * FROM refs LIMIT 3\" }\n"
661665
},
662666
{
663667
"Type": "NodeCodeBlockFenceCloseMarker",
@@ -676,7 +680,7 @@
676680
},
677681
"Properties": {
678682
"id": "20241212102027-j293sei",
679-
"updated": "20241213215714"
683+
"updated": "20250801152821"
680684
},
681685
"Children": [
682686
{
@@ -709,19 +713,20 @@
709713
"Properties": {
710714
"id": "20241213215714-u0j3i4k",
711715
"style": "line-height: 22px;",
712-
"updated": "20241213215714"
716+
"updated": "20250801152821"
713717
},
714718
"Children": [
715719
{
716720
"Type": "NodeCodeBlockFenceOpenMarker",
717721
"Data": "```"
718722
},
719723
{
720-
"Type": "NodeCodeBlockFenceInfoMarker"
724+
"Type": "NodeCodeBlockFenceInfoMarker",
725+
"CodeBlockInfo": "dGVtcGxhdGU="
721726
},
722727
{
723728
"Type": "NodeCodeBlockCode",
724-
"Data": ".action{ (statBlock .id).RuneCount} .action{ (statBlock .id).WordCount}\n"
729+
"Data": ".action{ (statBlock .id).RuneCount }\n.action{ (statBlock .id).WordCount }\n"
725730
},
726731
{
727732
"Type": "NodeCodeBlockFenceCloseMarker",
@@ -1411,7 +1416,8 @@
14111416
"Type": "NodeHeading",
14121417
"HeadingLevel": 2,
14131418
"Properties": {
1414-
"id": "20210104091444-xz57sof"
1419+
"id": "20210104091444-xz57sof",
1420+
"updated": "20250801152837"
14151421
},
14161422
"Children": [
14171423
{
@@ -1428,36 +1434,26 @@
14281434
"ID": "20210104091444-cclnk66",
14291435
"Type": "NodeCodeBlock",
14301436
"IsFencedCodeBlock": true,
1431-
"CodeBlockFenceChar": 96,
1432-
"CodeBlockFenceLen": 3,
1433-
"CodeBlockOpenFence": "YGBg",
1434-
"CodeBlockInfo": "cGxhaW50ZXh0",
1435-
"CodeBlockCloseFence": "YGBg",
14361437
"Properties": {
1437-
"id": "20210104091444-cclnk66"
1438+
"id": "20210104091444-cclnk66",
1439+
"updated": "20250801152837"
14381440
},
14391441
"Children": [
14401442
{
14411443
"Type": "NodeCodeBlockFenceOpenMarker",
1442-
"Data": "```",
1443-
"CodeBlockFenceLen": 3
1444+
"Data": "```"
14441445
},
14451446
{
14461447
"Type": "NodeCodeBlockFenceInfoMarker",
1447-
"CodeBlockInfo": "cGxhaW50ZXh0"
1448+
"CodeBlockInfo": "dGVtcGxhdGU="
14481449
},
14491450
{
1450-
"ID": "20220307092214-3y1eex2",
14511451
"Type": "NodeCodeBlockCode",
1452-
"Data": ".action{$before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24)}\n\n.action{$after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24)}\nToday is `.action{now | date \"2006-01-02\"}`.\n\n* `.action{$before}` days have passed since `2020-02-19`\n* There are `.action{$after}` days left from `2048-02-19`\n",
1453-
"Properties": {
1454-
"id": "20220307092214-3y1eex2"
1455-
}
1452+
"Data": ".action{ $before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24) }\n.action{ $after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24) }\nToday is `.action{ now | date \"2006-01-02\" }`.\n\n* `.action{ $before }` days have passed since `2020-02-19`\n* There are `.action{ $after }` days left from `2048-02-19`\n"
14561453
},
14571454
{
14581455
"Type": "NodeCodeBlockFenceCloseMarker",
1459-
"Data": "```",
1460-
"CodeBlockFenceLen": 3
1456+
"Data": "```"
14611457
}
14621458
]
14631459
},

0 commit comments

Comments
 (0)