mdparser

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSpecial

func IsSpecial(r rune) bool

Types

type WMarkDown

type WMarkDown interface {
	Append(md WMarkDown) WMarkDown
	AppendThis(md WMarkDown) WMarkDown
	ToString() string

	AppendNormal(text string) WMarkDown
	AppendNormalThis(text string) WMarkDown
	AppendBold(text string) WMarkDown
	AppendBoldThis(text string) WMarkDown
	AppendItalic(text string) WMarkDown
	AppendItalicThis(text string) WMarkDown
	AppendStrike(text string) WMarkDown
	AppendStrikeThis(text string) WMarkDown
	AppendMono(text string) WMarkDown
	AppendMonoThis(text string) WMarkDown
	AppendUnderline(text string) WMarkDown
	AppendUnderlineThis(text string) WMarkDown
	AppendHyperLink(text, url string) WMarkDown
	AppendHyperLinkThis(text, url string) WMarkDown
	AppendMention(text string, id int64) WMarkDown
	AppendMentionThis(text string, id int64) WMarkDown

	Normal(text string) WMarkDown
	Bold(text string) WMarkDown
	Italic(text string) WMarkDown
	Mono(text string) WMarkDown
	HyperLink(text, url string) WMarkDown
	Link(text, url string) WMarkDown
	Mention(text string, id int64) WMarkDown
	UserMention(text string, id int64) WMarkDown
	Spoiler(text string) WMarkDown
	Strike(text string) WMarkDown
	Underline(text string) WMarkDown

	El() WMarkDown
	ElThis() WMarkDown
	Space() WMarkDown
	SpaceThis() WMarkDown
	Tab() WMarkDown
	TabThis() WMarkDown
	// contains filtered or unexported methods
}

func GetBold

func GetBold(text string) WMarkDown

func GetEmpty

func GetEmpty() WMarkDown
func GetHyperLink(text string, url string) WMarkDown

func GetItalic

func GetItalic(text string) WMarkDown

func GetMono

func GetMono(text string) WMarkDown

func GetNormal

func GetNormal(text string) WMarkDown

func GetSpoiler added in v1.0.8

func GetSpoiler(text string) WMarkDown

func GetStrike added in v1.0.8

func GetStrike(text string) WMarkDown

func GetUnderline added in v1.0.8

func GetUnderline(text string) WMarkDown

func GetUserMention

func GetUserMention(text string, userID int64) WMarkDown

GetUserMention will give you a mentioning style username with the specified text. WARNING: you don't need to repair text before sending it as first arg, this function will check it itself.

func ParseFromMessage added in v1.0.8

func ParseFromMessage(message *gotgbot.Message) WMarkDown

ParseFromMessage will parse the message and return a WMarkDown object. Warning: this function won't work for complicated messages which contains more than one type of md for a specified offset.

Jump to

Keyboard shortcuts

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