markdown

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package markdown facilitates rendering markdown in the terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(text string, opts ...glamour.TermRendererOption) (string, error)

Render the markdown string according to the specified rendering options. By default emoji are rendered and new lines are preserved.

func WithBaseURL

func WithBaseURL(u string) glamour.TermRendererOption

WithBaseURL is a rendering option that sets the base URL to use when rendering relative URLs.

func WithTheme

func WithTheme(theme string) glamour.TermRendererOption

WithTheme is a rendering option that sets the theme to use while rendering the markdown. It can be used in conjunction with [term.Theme]. If the enviornment variable GLAMOUR_STYLE is set, it will take precedence over the provided theme.

func WithWrap

func WithWrap(w int) glamour.TermRendererOption

WithoutWrap is a rendering option that set the character limit for soft wraping the markdown rendering.

func WithoutIndentation

func WithoutIndentation() glamour.TermRendererOption

WithoutIndentation is a rendering option that removes indentation from the markdown rendering.

Types

This section is empty.

Jump to

Keyboard shortcuts

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