markdown

package
v0.62.5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 4 Imported by: 10

Documentation

Index

Constants

View Source
const (
	GFMTableSep      = "|"
	GFMTableSepStart = GFMTableSep + " "
	GFMTableSepMid   = " " + GFMTableSep + " "
	GFMTableSepEnd   = " " + GFMTableSep
)

Variables

This section is empty.

Functions

func BoldText

func BoldText(haystack, needle string) string

BoldText bodifies the identified text. It looks for start of words using a word boundary and will arbirarily end to match words with different suffixes.

func Linkify

func Linkify(url, text string) string

Linkify constructs a link from url and text inputs. This function does not handle escaping so it should be done before hand, e.g. using `\[` instead of `[` by itself in the `text`.

func ParseLink(s string) (string, string)

ParseLink returns text and url.

func SkypeToMarkdown

func SkypeToMarkdown(input string, stripURLAutoLink bool) string

SkypeToMarkdown converts Skype markup to Markdown. This is specifically useful for converting Slack messages to Markdown. The `stripURLAutoLink` parameter will remove links when they are within 3 backticks and the link innerHTML and URL match. Default is `true`.

func TableRowToMarkdown added in v0.48.0

func TableRowToMarkdown(cells []string, esc bool) string

func TableRowsToMarkdown added in v0.48.0

func TableRowsToMarkdown(rows [][]string, newline string, esc, withHeader bool) string

func TableSeparator added in v0.48.0

func TableSeparator(cellCount uint) string

func URLToMarkdownLinkHostname added in v0.37.0

func URLToMarkdownLinkHostname(url string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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