format

package
v0.0.0-...-de42b31 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockTags = []string{"p", "h1", "h2", "h3", "h4", "h5", "h6", "ol", "ul", "pre", "blockquote", "div", "hr", "table"}
View Source
var MatrixToURL = regexp.MustCompile("^(?:https?://)?(?:www\\.)?matrix\\.to/#/([#@!+].*)(?:/(\\$.+))?")

Functions

func Digits

func Digits(num int) int

func HTMLToText

func HTMLToText(html string) string

func RenderMarkdown

func RenderMarkdown(text string) gomatrix.Content

Types

type HTMLParser

type HTMLParser struct {
	PillConverter           func(mxid, eventID string) string
	TabsToSpaces            int
	Newline                 string
	BoldConverter           TextConverter
	ItalicConverter         TextConverter
	StrikethroughConverter  TextConverter
	UnderlineConverter      TextConverter
	MonospaceBlockConverter TextConverter
	MonospaceConverter      TextConverter
}

func (*HTMLParser) Parse

func (parser *HTMLParser) Parse(htmlData string) string

type TaggedString

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

type TextConverter

type TextConverter func(string) string

Jump to

Keyboard shortcuts

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