mdplain

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mdplain provides the functionality to convert markdown to plain text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlainMarkdown

func PlainMarkdown(markdown string) (string, error)

PlainMarkdown runs a VERY naive cleanup of markdown text to make it more palatable as plain text.

Types

type TextRender

type TextRender struct{}

TextRender is a renderer that converts a markdown AST to plain text.

func NewTextRenderer

func NewTextRenderer() *TextRender

NewTextRenderer returns a new TextRender.

func (*TextRender) AddOptions

func (r *TextRender) AddOptions(...renderer.Option)

AddOptions is a no-op.

func (*TextRender) Render

func (r *TextRender) Render(w io.Writer, source []byte, n ast.Node) error

Render converts the markdown AST to plain text.

Jump to

Keyboard shortcuts

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