commonmark

package
v2.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// For example:
	//
	//  [view more](/about.html)
	LinkInlined linkStyle = "inlined"

	LinkReferencedIndex linkStyle = "referenced_index"
	LinkReferencedShort linkStyle = "referenced_short"
)
View Source
const (
	// HeadingATX is the heading style of prefixing the heading with "#" signs indicating the level. For example:
	//
	//  ## Heading
	HeadingATX headingStyle = "atx"

	// HeadingSetext is the heading style of putting "=" or "-" on the followed line. For example:
	//
	//  Heading
	//  -------
	HeadingSetext headingStyle = "setext"
)

Variables

This section is empty.

Functions

func NewCommonmarkPlugin

func NewCommonmarkPlugin(opts ...OptionFunc) converter.Plugin

NewCommonmarkPlugin registers the markdown syntax of commonmark.

Types

type OptionFunc

type OptionFunc = func(config *config)

func WithBulletListMarker

func WithBulletListMarker(marker string) OptionFunc

"-", "+", or "*"

default: "-"

func WithCodeBlockFence

func WithCodeBlockFence(fence string) OptionFunc

``` or ~~~

default: ```

func WithEmDelimiter

func WithEmDelimiter(delimiter string) OptionFunc

_ or *

default: *

func WithHeadingStyle

func WithHeadingStyle(style headingStyle) OptionFunc

"setext" or "atx"

default: "atx" HeadingStyle string

func WithHorizontalRule

func WithHorizontalRule(rule string) OptionFunc

Any Thematic break

default: "* * *"

func WithListEndComment

func WithListEndComment(enabled bool) OptionFunc

func WithStrongDelimiter

func WithStrongDelimiter(delimiter string) OptionFunc

** or __

default: **

type ValidateConfigError

type ValidateConfigError struct {
	Key   string
	Value string

	// By default is "Key:Value" but can be
	// overriden to e.g. "--key=value"
	KeyWithValue string
	// contains filtered or unexported fields
}

func (*ValidateConfigError) Error

func (e *ValidateConfigError) Error() string

Jump to

Keyboard shortcuts

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