Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchGFMEmailAt ¶
MatchGFMEmailAt matches an extended GFM email around the @ at the given byte offset.
func NewBlockMathParser ¶
func NewBlockMathParser() parser.BlockParser
NewBlockMathParser creates a parser for dollar-fenced flow math.
func NewInlineMathParser ¶
func NewInlineMathParser() parser.InlineParser
NewInlineMathParser creates a parser for exact dollar-run inline math.
Types ¶
type GFMEmailMatch ¶
GFMEmailMatch is one extended GFM email autolink source range.
func FindGFMEmailMatches ¶
func FindGFMEmailMatches(source []byte) []GFMEmailMatch
FindGFMEmailMatches finds extended GFM email autolinks in one literal text node.
type MentionMatch ¶
type MentionMatch struct {
// Start is the byte offset of the @ introducer within the source run.
Start int
// End is the exclusive byte offset of the recognized source spelling.
End int
// Username is the exact username without the @ introducer.
Username []byte
}
MentionMatch is one username reference in an eligible literal-source run.
func FindMentionMatches ¶
func FindMentionMatches(source []byte, runHasLeftBoundary bool) []MentionMatch
FindMentionMatches enumerates username references in one eligible literal-source run. Markdown structure and GFM email precedence must be resolved before calling it.
type TagMatch ¶
type TagMatch struct {
// Start is the byte offset of the introducer within the source run.
Start int
// End is the exclusive byte offset of the recognized source spelling.
End int
// Value is the emitted direct tag value without the introducer.
Value []byte
}
TagMatch is one lexical tag match within an eligible literal-source run.
func FindTagMatches ¶
FindTagMatches enumerates tag candidates in one eligible literal-source run. Markdown structure must be resolved before calling it.