Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KindCallout = ast.NewNodeKind("Callout")
KindCallout is the node kind for a > [!type] callout.
var KindEmbed = ast.NewNodeKind("Embed")
KindEmbed is the node kind for an inline ![embed].
var KindWikilink = ast.NewNodeKind("Wikilink")
KindWikilink is the node kind for a [[wikilink]].
Functions ¶
Types ¶
type Option ¶
type Option func(*renderer)
Option configures a Renderer.
func WithPages ¶
WithPages sets the source used to expand ![[embeds]]. Without one an embed is dropped.
func WithResolver ¶
WithResolver sets the wikilink resolver. Without one every wikilink is missing.
type Pages ¶
type Pages interface {
// Page returns the content of name and whether it exists.
Page(name string) (string, bool)
}
Pages returns page content by name so ![[embeds]] can be inlined.
type Renderer ¶
type Renderer interface {
// Render renders source to HTML.
Render(ctx context.Context, source string) (string, error)
}
Renderer renders Obsidian-flavoured markdown to HTML.