Import std.text.markdown
MarkdownNode
class
Public Class MarkdownNode
A node of a document: a block, like a paragraph or a list, with the blocks, spans, and text in it; a span, like a link, with what's in it; or text.
Examples
Local document = ParseMarkdown("[home](https://futureblitz.dev)")
Local link = document.Children[0].Children[0]
Expect(link.Kind == MarkdownKind.Link && link.Url == "https://futureblitz.dev")
Expect(link.PlainText() == "home")std/text/markdown.fb, line 127
-
What kind of node it is.
-
What's in it, in order.
-
A Text's or an Html's text, and a CodeBlock's, a Code's, or an HtmlBlock's, which have no children.
-
A Heading's level, from 1 to 6.
-
An OrderedList's first number.
-
Whether a list is tight, with no blank lines between its items. Its items have no Paragraphs, in HTML or here: each holds its spans and text itself.
-
Whether a ListItem is a task,
- [ ] to do, and whether it's done,- [x] done. -
Whether a task ListItem is done.
-
A Link's URL or an Image's source, and its title.
-
A Link's or an Image's title.
-
Whether a Link is an autolink: https://example.com, or a bare URL with Autolinks.
-
A CodeBlock's info string, like "rust ignore", and its language, the first word of it.
-
A CodeBlock's language, the first word of its info string.
-
A TableHeaderCell's or TableCell's alignment.
-
A new node of
kind, with nothing in it. -
The text in it, without the markup: a heading's words, a link's, or an image's description, with a newline for each break. Each block in it, like a paragraph, a list item, or a table's row, is on lines of its own, and a row's cells are apart by a tab. A code block's text has no newline at its end, and raw HTML has none.
Report an issue with this page or with FutureBlitz on GitHub.