markdown

package
v0.0.0-...-bcbcb81 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter wraps goldmark for markdown to HTML conversion

func NewConverter

func NewConverter() *Converter

NewConverter creates a new markdown converter with GFM extensions.

func (*Converter) Convert

func (c *Converter) Convert(source []byte) (string, error)

Convert converts markdown source to HTML

type HeadingRenderer

type HeadingRenderer struct{}

HeadingRenderer renders headings with a clickable anchor link.

func (*HeadingRenderer) RegisterFuncs

func (r *HeadingRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)

RegisterFuncs implements renderer.NodeRenderer.

type ImageAttributeTransformer

type ImageAttributeTransformer struct{}

ImageAttributeTransformer attaches a trailing {...} attribute list (e.g. {.small-centered}) immediately following an image to that image's node, so the attribute renders on the <img> tag. The brace text itself is removed from the surrounding paragraph.

func (*ImageAttributeTransformer) Transform

func (t *ImageAttributeTransformer) Transform(doc *ast.Document, reader text.Reader, _ parser.Context)

Transform implements parser.ASTTransformer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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