Add link
This commit is contained in:
@@ -154,24 +154,26 @@ func pprint*(x: OrgDocument, indent = 0): string =
|
|||||||
fields,
|
fields,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
## OrgDocument.PrettyPrinters
|
## OrgDocument.PrettyPrinters
|
||||||
|
|
||||||
func `$`*(xs: OrgDocument): string = pprint(xs)
|
func `$`*(xs: OrgDocument): string = pprint(xs)
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
echo OrgDocument(
|
let doc = OrgDocument(
|
||||||
children: @[
|
children: @[
|
||||||
OrgBlock(
|
OrgBlock(
|
||||||
kind: orgHeading,
|
kind: orgHeading,
|
||||||
children: @[
|
children: @[
|
||||||
OrgInlineBlock(
|
OrgInlineBlock(
|
||||||
kind: orgLink,
|
kind: orgLink,
|
||||||
linkUrl: "Foo",
|
linkUrl: "https://placeholder.com",
|
||||||
linkDescription: "Bar".just(),
|
linkDescription: "Placeholder".just(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
OrgBlock(kind: orgHeading),
|
OrgBlock(kind: orgHeading, level: 1),
|
||||||
OrgBlock(kind: orgHeading),
|
OrgBlock(kind: orgHeading),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user