Documentation ¶
Index ¶
- Variables
- func NewDiscordUnderlineHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewDiscordUnderlineParser() parser.InlineParser
- func NewSimpleSpoilerParser() parser.InlineParser
- func NewSpoilerHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
- func NewSpoilerParser() parser.InlineParser
- func ParserWithoutFeatures(features ...any) parser.Parser
Constants ¶
This section is empty.
Variables ¶
var DiscordUnderline = &discordUnderline{}
DiscordUnderline is an extension that allow you to use underline expression like '__text__' .
var DiscordUnderlineAttributeFilter = html.GlobalAttributeFilter
var EscapeHTML = &extEscapeHTML{}
EscapeHTML is an extension that escapes HTML in the input markdown instead of passing it through as-is.
var FixIndentedParagraphs = goldmark.WithParserOptions(parser.WithBlockParsers(util.Prioritized(defaultIndentableParagraphParser, 500)))
FixIndentedParagraphs is a goldmark option which fixes indented paragraphs when disabling CodeBlockParser.
var LongStrike goldmark.Extender = &shortStrikeExtender{length: 2}
var ShortEmphasis goldmark.Extender = &shortEmphasisExtender{}
var ShortStrike goldmark.Extender = &shortStrikeExtender{length: 1}
var SimpleSpoiler = &simpleSpoiler{}
SimpleSpoiler is an extension that allow you to use simple spoiler expression like '||text||' .
For spoilers with reasons ('||reason|text||'), use the Spoiler extension.
var Spoiler = &extSpoiler{}
Spoiler is an extension that allow you to use spoiler expression like '||text||' or ||reason|text|| .
There are some types of nested formatting that aren't supported with advanced spoilers. The SimpleSpoiler extension that doesn't support reasons can be used to work around those.
Functions ¶
func NewDiscordUnderlineHTMLRenderer ¶
func NewDiscordUnderlineHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewDiscordUnderlineHTMLRenderer returns a new discordUnderlineHTMLRenderer.
func NewDiscordUnderlineParser ¶
func NewDiscordUnderlineParser() parser.InlineParser
NewDiscordUnderlineParser return a new InlineParser that parses Discord underline expressions.
func NewSimpleSpoilerParser ¶
func NewSimpleSpoilerParser() parser.InlineParser
func NewSpoilerHTMLRenderer ¶
func NewSpoilerHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
func NewSpoilerParser ¶
func NewSpoilerParser() parser.InlineParser
func ParserWithoutFeatures ¶
ParserWithoutFeatures returns a Goldmark parser with the provided default features removed.
e.g. to disable lists, use
markdown := goldmark.New(goldmark.WithParser( mdext.ParserWithoutFeatures(goldmark.NewListParser(), goldmark.NewListItemParser()) ))
Types ¶
This section is empty.