base

package
v1.0.0-alpha.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBasePlugin

func NewBasePlugin() converter.Plugin

NewBasePlugin registers a bunch of stuff that is not necessarily related to commonmark, like removing nodes, trimming whitespace, collapsing whitespace, ...

func RenderAsHTML

func RenderAsHTML(ctx converter.Context, w converter.Writer, node *html.Node) converter.RenderStatus

RenderAsHTML will render the node as HTML using `html.Render()` Newlines will be inserted depending on the configured `TagType`.

As an example, you could do such a combination:

"A text with <strong>bold</strong> and *italic* text"`

func RenderAsHTMLWrapper

func RenderAsHTMLWrapper(ctx converter.Context, w converter.Writer, node *html.Node) converter.RenderStatus

RenderAsHTMLWrapper will render the node as HTML and render the children as markdown.

func RenderAsPlaintextWrapper

func RenderAsPlaintextWrapper(ctx converter.Context, w converter.Writer, node *html.Node) converter.RenderStatus

RenderAsPlaintextWrapper will keep the children of this node as markdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL