Documentation
¶
Index ¶
- Constants
- Variables
- func CleanupDocumentContent(uri string)
- func ClearImageCache()
- func HTML(document, uri string, changeLine int) (string, map[string]any)
- func NormalizePath(uri string) string
- type AlertType
- type GitHubAlertExtension
- type GitHubAlertNode
- type GitHubAlertRenderer
- type GitHubAlertTransformer
- type LinkResolverTransformer
- type ScrollIDTransformer
Constants ¶
const (
ScrollAnchor = "mpls-scroll-anchor"
)
Variables ¶
var ( CodeHighlightingStyle string EnableWikiLinks bool WorkspaceRoot string EnableFootnotes bool EnableEmoji bool )
var KindGitHubAlert = ast.NewNodeKind("GitHubAlert")
KindGitHubAlert is the NodeKind for a GitHub alert node.
Functions ¶
func CleanupDocumentContent ¶ added in v0.17.1
func CleanupDocumentContent(uri string)
func ClearImageCache ¶ added in v0.20.0
func ClearImageCache()
ClearImageCache clears the image cache. Useful for testing.
func NormalizePath ¶ added in v0.14.0
Types ¶
type AlertType ¶ added in v0.20.0
type AlertType int
AlertType represents the type of a GitHub-style alert.
func (AlertType) CSSClass ¶ added in v0.20.0
CSSClass returns the CSS class suffix for the alert type.
type GitHubAlertExtension ¶ added in v0.20.0
type GitHubAlertExtension struct{}
GitHubAlertExtension is a Goldmark extension that adds support for GitHub-style alerts (admonitions).
func (*GitHubAlertExtension) Extend ¶ added in v0.20.0
func (e *GitHubAlertExtension) Extend(m goldmark.Markdown)
Extend adds the GitHub alert transformer and renderer to Goldmark.
type GitHubAlertNode ¶ added in v0.20.0
GitHubAlertNode is a custom AST node representing a GitHub-style alert.
func (*GitHubAlertNode) Dump ¶ added in v0.20.0
func (n *GitHubAlertNode) Dump(source []byte, level int)
Dump dumps the node for debugging.
func (*GitHubAlertNode) Kind ¶ added in v0.20.0
func (n *GitHubAlertNode) Kind() ast.NodeKind
Kind returns the kind of this node.
type GitHubAlertRenderer ¶ added in v0.20.0
type GitHubAlertRenderer struct{}
GitHubAlertRenderer renders GitHubAlertNode nodes to HTML.
func (*GitHubAlertRenderer) RegisterFuncs ¶ added in v0.20.0
func (r *GitHubAlertRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs registers the renderer function for GitHubAlertNode.
type GitHubAlertTransformer ¶ added in v0.20.0
type GitHubAlertTransformer struct{}
GitHubAlertTransformer is an AST transformer that converts blockquotes with [!TYPE] markers into GitHubAlertNode nodes.
type LinkResolverTransformer ¶ added in v0.17.0
type LinkResolverTransformer struct {
// contains filtered or unexported fields
}