markdown

package
v0.0.0-...-39763c8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRenderer renderer.Renderer = &BasicRenderer{}

Functions

func Convert

func Convert(githubMD, readMoreURL string) string
func ConvertHyperlink(content, href string) string

func ConvertLabels

func ConvertLabels[T *github.Label | github.Label](labelsV []T) string

func ConvertTeams

func ConvertTeams(teams []*github.Team) string

func ConvertThreadURL

func ConvertThreadURL(t *github.PullRequestThread) (url string)

func ConvertUsers

func ConvertUsers(users []*github.User) string

func Unescape

func Unescape(src []byte) []byte

Unescape handles escape characters. This is a helper function for renderers.

func UnescapeWriter

func UnescapeWriter(w io.Writer) io.Writer

Types

type BasicRenderer

type BasicRenderer struct{}

BasicRenderer renders the package's ast.Nodes into simple unformatted plain text. It serves as an implementation reference. However, this implementation does not have a state, which is required for Inline and Blockquote.

func (*BasicRenderer) AddOptions

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

func (*BasicRenderer) Render

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

Jump to

Keyboard shortcuts

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