plugin

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 10 Imported by: 25

Documentation

Overview

Package plugin contains all the rules that are not part of Commonmark like GitHub Flavored Markdown.

Index

Constants

View Source
const (
	VimeoOnlyThumbnail vimeoVariation = iota
	VimeoWithTitle
	VimeoWithDescription
)

Configure how the Vimeo Plugin should display the video in markdown.

Variables

View Source
var Timeout = time.Second * 10

Timeout for the http client

Functions

func ConfluenceAttachments

func ConfluenceAttachments() md.Plugin

ConfluenceAttachments converts `<ri:attachment ri:filename=""/>` elements [Contributed by @Skarlso]

func ConfluenceCodeBlock

func ConfluenceCodeBlock() md.Plugin

ConfluenceCodeBlock converts `<ac:structured-macro>` elements that are used in Atlassian’s Wiki “Confluence”. [Contributed by @Skarlso]

func EXPERIMENTALFrontMatter added in v1.2.0

func EXPERIMENTALFrontMatter(format string) md.Plugin

EXPERIMENTALFrontMatter was an experiment to add certain data from a callback function into the beginning of the file as frontmatter. It not really working right now.

If someone has a need for it, let me know what your use-case is. Then I can create a plugin with a good interface.

func EXPERIMENTALMoveFrontMatter added in v1.2.1

func EXPERIMENTALMoveFrontMatter(delimiters ...rune) md.Plugin

EXPERIMENTALMoveFrontMatter moves a frontmatter block at the beginning of the document to the top of the generated markdown block, without touching (and escaping) it.

func GitHubFlavored

func GitHubFlavored() md.Plugin

GitHubFlavored is GitHub's Flavored Markdown

func Strikethrough

func Strikethrough(character string) md.Plugin

Strikethrough converts `<strike>`, `<s>`, and `<del>` elements

func Table added in v1.2.0

func Table() md.Plugin

Table converts a html table (using hyphens and pipe characters) to a visuall representation in markdown.

Note: This Plugin overrides the default compatibility rules from `commonmark.go`. Only use this Plugin in an environment that has extendeded the normal syntax, like GitHub's Flavored Markdown.

func TableCompat added in v1.2.0

func TableCompat() md.Plugin

TableCompat is a compatibility plugin for environments where only commonmark markdown (without Tables) is supported.

Note: In an environment that supports "real" Tables, like GitHub's Flavored Markdown use `plugin.Table()` instead.

func TaskListItems

func TaskListItems() md.Plugin

TaskListItems converts checkboxes into task list items.

func VimeoEmbed added in v1.5.0

func VimeoEmbed(variation vimeoVariation) md.Plugin

VimeoEmbed registers a rule (for iframes) and returns a markdown compatible representation (link to video, ...).

func YoutubeEmbed added in v1.5.0

func YoutubeEmbed() md.Plugin

YoutubeEmbed registers a rule (for iframes) and returns a markdown compatible representation (link to video, ...).

Types

This section is empty.

Jump to

Keyboard shortcuts

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