markdown

package
v0.0.0-...-2e1bc12 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignHeadings

func AlignHeadings(text string) string

AlignHeadings unindents headings.

Ex: (### Note: Blabla)

blabla
#### Blablabla
blablabla
##### Blablablabla
blablablabla

Becomes:

blabla
## Blablabla
blablabla
### Blablablabla
blablablabla

func CleanCodeBlocks

func CleanCodeBlocks(md string) string

CleanCodeBlocks removes code blocks by injecting blank lines to preserve line numbers.

func ExtractQuote

func ExtractQuote(md string) (string, string)

ExtractQuote extracts a quote from a note content (support basic and sugar syntax)

func IsHeading

func IsHeading(line string) (bool, string, int)

IsHeading returns if a givne line is a Markdown heading and its level.

func ReplaceAsciidocCharacterSubstitutions

func ReplaceAsciidocCharacterSubstitutions(md string) string

ReplaceAsciidocCharacterSubstitutions replaces Asciidoc special character sequences by their equivalent in Unicode.

func Slug

func Slug(values ...string) string

Slug returns a slug from a list of raw Markdown input values that will be processed.

func StripComment

func StripComment(body string) (string, string)

StripComment extracts the optional user comment from a note body.

func StripEmphasis

func StripEmphasis(text string) string

StripEmphasis remove Markdown emphasis characters.

func StripTopHeading

func StripTopHeading(md string) string

StripTopHeading remove the header

func ToHTML

func ToHTML(md string) string

func ToInlineHTML

func ToInlineHTML(md string) string

func ToMarkdown

func ToMarkdown(markdownText string) string

func ToText

func ToText(md 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