Documentation ¶
Index ¶
- Variables
- func EscapeMarkdown(r []rune, toEscape []rune) string
- func EscapeMarkdownV2(r []rune) string
- func IsEscaped(input []rune, pos int) bool
- func MD2HTML(input string) string
- func MD2HTMLV2(in string) string
- func Reverse(s string, buttons []Button) string
- func ReverseV2(in string, bs []ButtonV2) (string, error)
- func StripHTML(s string) string
- func StripHTMLV2(s string) string
- func StripMD(s string) string
- func StripMDV2(s string) string
- type Button
- type ButtonV2
- type Converter
- type ConverterV2
- func (cv ConverterV2) ButtonToMarkdown(btn ButtonV2) (string, error)
- func (cv ConverterV2) MD2HTML(in string) string
- func (cv ConverterV2) MD2HTMLButtons(in string) (string, []ButtonV2)
- func (cv ConverterV2) Reverse(in string, bs []ButtonV2) (string, error)
- func (cv ConverterV2) StripHTMLV2(s string) string
- func (cv ConverterV2) StripMDV2(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var AllMarkdownV2Chars = func() []rune { var outString []string for k := range chars { outString = append(outString, k) } sort.Strings(outString) var out []rune for _, x := range outString { out = append(out, []rune(x)[0]) } return out }()
View Source
var ErrNoButtonContent = errors.New("no button contents")
Functions ¶
func EscapeMarkdown ¶
func EscapeMarkdownV2 ¶
func StripHTMLV2 ¶
Types ¶
type Button ¶
func MD2HTMLButtons ¶
type ButtonV2 ¶
ButtonV2 identifies a button. It can contain either a URL, or Text, depending on whether it is a buttonURL: or a buttonText:
func MD2HTMLButtonsV2 ¶
type Converter ¶
func (*Converter) MD2HTMLButtons ¶
type ConverterV2 ¶
func NewV2 ¶
func NewV2(prefixes map[string]string) *ConverterV2
func (ConverterV2) ButtonToMarkdown ¶
func (cv ConverterV2) ButtonToMarkdown(btn ButtonV2) (string, error)
func (ConverterV2) MD2HTML ¶
func (cv ConverterV2) MD2HTML(in string) string
func (ConverterV2) MD2HTMLButtons ¶
func (cv ConverterV2) MD2HTMLButtons(in string) (string, []ButtonV2)
func (ConverterV2) Reverse ¶
func (cv ConverterV2) Reverse(in string, bs []ButtonV2) (string, error)
func (ConverterV2) StripHTMLV2 ¶
func (cv ConverterV2) StripHTMLV2(s string) string
func (ConverterV2) StripMDV2 ¶
func (cv ConverterV2) StripMDV2(s string) string
Click to show internal directories.
Click to hide internal directories.