Documentation ¶
Index ¶
- Constants
- func CalculateCodeFence(fenceChar rune, content string) string
- func CalculateCodeFenceOccurrences(fenceChar rune, content string) int
- func CollapseInlineCodeContent(content []byte) []byte
- func DelimiterForEveryLine(text []byte, delimiter []byte) []byte
- func EscapeMultiLine(content []byte) []byte
- func PrefixLines(source []byte, repl []byte) []byte
- func SurroundBy(content []byte, chars []byte) []byte
- func SurroundByQuotes(content []byte) []byte
- func SurroundingSpaces(content []byte) ([]byte, []byte, []byte)
- func TrimConsecutiveNewlines(source []byte) []byte
Constants ¶
View Source
const ( DOUBLE_QUOTE = '"' SINGLE_QUOTE = '\'' )
Variables ¶
This section is empty.
Functions ¶
func CalculateCodeFence ¶
CalculateCodeFence can be passed the content of a code block and it returns how many fence characters (` or ~) should be used.
This is useful if the html content includes the same fence characters for example ``` -> https://stackoverflow.com/a/49268657
func DelimiterForEveryLine ¶
DelimiterForEveryLine puts the delimiter not just at the start and end of the string but if the text is divided on multiple lines, puts the delimiters on every line with content.
Otherwise the bold/italic delimiters won't be recognized if it contains new line characters.
func EscapeMultiLine ¶
func PrefixLines ¶
func SurroundBy ¶
func SurroundByQuotes ¶
func TrimConsecutiveNewlines ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.