This commit is contained in:
Florian Schroedl
2022-05-04 17:00:00 +02:00
parent 4b59ac3727
commit 2717984b6c

View File

@@ -154,24 +154,26 @@ func pprint*(x: OrgDocument, indent = 0): string =
fields,
)
## OrgDocument.PrettyPrinters
func `$`*(xs: OrgDocument): string = pprint(xs)
when isMainModule:
echo OrgDocument(
let doc = OrgDocument(
children: @[
OrgBlock(
kind: orgHeading,
children: @[
OrgInlineBlock(
kind: orgLink,
linkUrl: "Foo",
linkDescription: "Bar".just(),
linkUrl: "https://placeholder.com",
linkDescription: "Placeholder".just(),
),
],
),
OrgBlock(kind: orgHeading),
OrgBlock(kind: orgHeading, level: 1),
OrgBlock(kind: orgHeading),
]
)