Documentation ¶
Index ¶
- Constants
- func BoldText(haystack, needle string) string
- func Linkify(url, text string) string
- func ParseLink(s string) (string, string)
- func SkypeToMarkdown(input string, stripURLAutoLink bool) string
- func TableRowToMarkdown(cells []string, esc bool) string
- func TableRowsToMarkdown(rows [][]string, newline string, esc, withHeader bool) string
- func TableSeparator(cellCount uint) string
- func URLToMarkdownLinkHostname(url string) string
- type Link
- type Links
Constants ¶
View Source
const ( GFMTableSep = "|" GFMTableSepStart = GFMTableSep + " " GFMTableSepMid = " " + GFMTableSep + " " GFMTableSepEnd = " " + GFMTableSep )
Variables ¶
This section is empty.
Functions ¶
func BoldText ¶
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 ¶
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 SkypeToMarkdown ¶
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 TableRowsToMarkdown ¶ added in v0.48.0
func TableSeparator ¶ added in v0.48.0
func URLToMarkdownLinkHostname ¶ added in v0.37.0
Types ¶
Click to show internal directories.
Click to hide internal directories.