markdown

Imports

Imports #

"bytes"
"fmt"
"strings"
"bytes"
"strconv"
"strings"
"unicode"
"bytes"
"fmt"
"strings"
"unicode"
"unicode/utf8"
"bytes"
"fmt"
"strings"
"unicode/utf8"
"golang.org/x/text/cases"
"bytes"
"fmt"
"strings"
"bytes"
"bytes"
"strings"
"strings"
"bytes"
"bytes"
"fmt"
"strings"
"bytes"
"strings"
"bytes"
"fmt"
"reflect"
"slices"
"strings"

Constants & Variables

blockType var #

var blockType = *ast.CallExpr

blocksType var #

var blocksType = *ast.CallExpr

emoji var #

emoji maps known emoji names to their UTF-8 emoji forms.

var emoji = map[string]string{...}

htmlEntity var #

htmlEntity maps known HTML entity sequences to their meanings.

var htmlEntity = map[string]string{...}

htmlEscaper var #

var htmlEscaper = *ast.CallExpr

htmlLinkEscaper var #

var htmlLinkEscaper = *ast.CallExpr

htmlQuoteEscaper var #

var htmlQuoteEscaper = *ast.CallExpr

htmlTags var #

htmlTags lists the known HTML tags for HTML blocks.

var htmlTags = []string{...}

inlinesType var #

var inlinesType = *ast.CallExpr

maxBackticks const #

Inline code span markers must fit on punched cards, to match cmark-gfm.

const maxBackticks = 80

maxEmojiLen const #

const maxEmojiLen = 36

mdUnescaper var #

var mdUnescaper = *ast.CallExpr

news var #

var news = []func(*parseState, line) (line, bool){...}

Type Aliases

tableTrimmed type #

type tableTrimmed string

Interfaces

Block interface #

Block is implemented by: CodeBLock Document Empty HTMLBlock Heading Item List Paragraph Quote Text ThematicBreak

type Block interface {
Pos() Position
PrintHTML(buf *bytes.Buffer)
printMarkdown(buf *bytes.Buffer, s mdState)
}

Inline interface #

type Inline interface {
PrintHTML(*bytes.Buffer)
PrintText(*bytes.Buffer)
printMarkdown(*bytes.Buffer)
}

blockBuilder interface #

type blockBuilder interface {
extend(p *parseState, s line) (line, bool)
build(buildState) Block
}

buildState interface #

type buildState interface {
blocks() []Block
pos() Position
last() Block
deleteLast()
link(label string) *Link
defineLink(label string, link *Link)
newText(pos Position, text string) *Text
}

Structs

Code struct #

type Code struct {
Text string
}

CodeBlock struct #

type CodeBlock struct {
Position
Fence string
Info string
Text []string
}

Del struct #

type Del struct {
Marker string
Inner []Inline
}

Document struct #

type Document struct {
Position
Blocks []Block
Links map[string]*Link
}

Emoji struct #

type Emoji struct {
Name string
Text string
}

Emph struct #

type Emph struct {
Marker string
Inner []Inline
}

Empty struct #

type Empty struct {
Position
}

Escaped struct #

type Escaped struct {
Plain
}

HTMLBlock struct #

type HTMLBlock struct {
Position
Text []string
}

HTMLTag struct #

type HTMLTag struct {
Text string
}

HardBreak struct #

type HardBreak struct {

}

Heading struct #

type Heading struct {
Position
Level int
Text *Text
ID string
}

Image struct #

type Image struct {
Inner []Inline
URL string
Title string
TitleChar byte
corner bool
}

Item struct #

type Item struct {
Position
Blocks []Block
width int
}

List struct #

type List struct {
Position
Bullet rune
Start int
Loose bool
Items []Block
}

Paragraph struct #

type Paragraph struct {
Position
Text *Text
}

Parser struct #

A Parser is a Markdown parser. The exported fields in the struct can be filled in before calling [Parser.Parse] in order to customize the details of the parsing process. A Parser is safe for concurrent use by multiple goroutines.

type Parser struct {
HeadingIDs bool
Strikethrough bool
TaskListItems bool
AutoLinkText bool
AutoLinkAssumeHTTP bool
Table bool
Emoji bool
SmartDot bool
SmartDash bool
SmartQuote bool
}

Plain struct #

type Plain struct {
Text string
}

Position struct #

type Position struct {
StartLine int
EndLine int
}

Quote struct #

type Quote struct {
Position
Blocks []Block
}

SoftBreak struct #

type SoftBreak struct {

}

Strong struct #

type Strong struct {
Marker string
Inner []Inline
}

Table struct #

type Table struct {
Position
Header []*Text
Align []string
Rows [][]*Text
}

Task struct #

type Task struct {
Checked bool
}

Text struct #

type Text struct {
Position
Inline []Inline
raw string
}

ThematicBreak struct #

type ThematicBreak struct {
Position
raw string
}

backtickParser struct #

type backtickParser struct {
last [maxBackticks]int
scanned bool
}

emphPlain struct #

type emphPlain struct {
Plain
canOpen bool
canClose bool
i int
n int
}

fenceBuilder struct #

type fenceBuilder struct {
fence string
info string
n int
text []string
}

htmlBuilder struct #

type htmlBuilder struct {
endBlank bool
text []string
endFunc func(string) bool
}

itemBuilder struct #

type itemBuilder struct {
list *listBuilder
width int
haveContent bool
}

line struct #

type line struct {
spaces int
i int
tab int
text string
nl byte
}

listBuilder struct #

type listBuilder struct {
bullet rune
num int
loose bool
item *itemBuilder
todo func() line
}

mdState struct #

type mdState struct {
prefix string
prefix1 string
bullet rune
num int
}

openBlock struct #

type openBlock struct {
builder blockBuilder
inner []Block
pos Position
}

openPlain struct #

type openPlain struct {
Plain
i int
}

paraBuilder struct #

type paraBuilder struct {
text []string
table *tableBuilder
}

parseState struct #

type parseState struct {
*Parser
root *Document
links map[string]*Link
lineno int
stack []openBlock
lineDepth int
corner bool
s string
emitted int
list []Inline
lists []*List
texts []*Text
backticks backtickParser
}

preBuilder struct #

For indented code blocks.

type preBuilder struct {
indent string
text []string
}

quoteBuilder struct #

type quoteBuilder struct {

}

rootBuilder struct #

type rootBuilder struct {

}

tableBuilder struct #

type tableBuilder struct {
hdr tableTrimmed
delim tableTrimmed
rows []tableTrimmed
}

validDomainChecker struct #

type validDomainChecker struct {
s string
cut int
}

Functions

Inline method #

func (x *Strong) Inline()

Inline method #

func (*Emoji) Inline()

Inline method #

func (x *Task) Inline()

Inline method #

func (*Plain) Inline()

Inline method #

func (x *Del) Inline()

Inline method #

func (*HardBreak) Inline()

Inline method #

func (*Emph) Inline()

Inline method #

func (*AutoLink) Inline()

Inline method #

func (*Code) Inline()

Inline method #

func (*SoftBreak) Inline()

Inline method #

func (*Image) Inline()

Inline method #

func (*Link) Inline()

Inline method #

func (*HTMLTag) Inline()

Parse method #

func (p *Parser) Parse(text string) *Document

Pos method #

func (p Position) Pos() Position

PrintHTML method #

func (x *Del) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Strong) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Heading) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *AutoLink) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *CodeBlock) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Quote) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Link) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *SoftBreak) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Emph) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (t *Table) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Text) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Empty) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *List) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *HTMLTag) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Image) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *HardBreak) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Document) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *ThematicBreak) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Plain) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Item) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *Paragraph) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (b *HTMLBlock) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Emoji) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Code) PrintHTML(buf *bytes.Buffer)

PrintHTML method #

func (x *Task) PrintHTML(buf *bytes.Buffer)

PrintText method #

func (x *AutoLink) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Link) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Task) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Emoji) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Plain) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Strong) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *HTMLTag) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *SoftBreak) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *HardBreak) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Del) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Code) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Image) PrintText(buf *bytes.Buffer)

PrintText method #

func (x *Emph) PrintText(buf *bytes.Buffer)

ToHTML function #

func ToHTML(b Block) string

ToMarkdown function #

func ToMarkdown(b Block) string

addBlock method #

func (p *parseState) addBlock(c blockBuilder)

addLine method #

func (p *parseState) addLine(s line)

addRow method #

func (b *tableBuilder) addRow(row string)

autoLinkPlain method #

func (p *parseState) autoLinkPlain(s string) []Inline

autoLinkText method #

autoLinkMore rewrites any extended autolinks in the body and returns the result. body is a list of Plain, Emph, Strong, and Del nodes. Two Plains only appear consecutively when one is a potential emphasis marker that ended up being plain after all, like "_" or "**". There are no Link nodes. The GitHub “spec” declares that “autolinks can only come at the beginning of a line, after whitespace, or any of the delimiting characters *, _, ~, and (”. However, the GitHub web site does not enforce this rule: text like "$abc@def.ghi is my email" links the text following the $ as an email address. It appears the actual rule is that autolinks cannot come after ASCII letters, although they can come after numbers or Unicode letters. Since the only point of implementing GitHub Flavored Markdown is to match GitHub's behavior, we do what they do, not what they say, at least for now.

func (p *parseState) autoLinkText(list []Inline) []Inline

blocks method #

func (p *parseState) blocks() []Block

build method #

func (b *rootBuilder) build(p buildState) Block

build method #

func (c *fenceBuilder) build(p buildState) Block

build method #

func (b *preBuilder) build(p buildState) Block

build method #

func (b *listBuilder) build(p buildState) Block

build method #

func (b *paraBuilder) build(p buildState) Block

build method #

func (b *tableBuilder) build(p buildState) Block

build method #

func (b *quoteBuilder) build(p buildState) Block

build method #

func (b *itemBuilder) build(p buildState) Block

build method #

func (c *htmlBuilder) build(p buildState) Block

closeBlock method #

func (p *parseState) closeBlock() Block

curB method #

func (p *parseState) curB() blockBuilder

deleteLast method #

func (p *parseState) deleteLast()

doneBlock method #

func (p *parseState) doneBlock(b Block)

dump function #

func dump(b Block) string

emit method #

func (p *parseState) emit(i int)

emph method #

func (ps *parseState) emph(dst []Inline, src []Inline) []Inline

eof method #

func (s *line) eof() bool

extend method #

func (c *preBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (c *rootBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (c *fenceBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (b *quoteBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (c *htmlBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (c *listBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (c *itemBuilder) extend(p *parseState, s line) (line, bool)

extend method #

func (b *paraBuilder) extend(p *parseState, s line) (line, bool)

extractID function #

extractID removes an ID attribute from s if one is present. It returns the attribute value and the resulting string. The attribute has the form "{#...}", where the "..." can contain any character other than '}'. The attribute must be followed only by whitespace.

func extractID(p *parseState, s string) (id string, s2 string)

hasEndPre function #

func hasEndPre(s string) bool

inline method #

func (p *parseState) inline(s string) []Inline

ins function #

func ins(first Inline, x []Inline) []Inline

isBlank method #

func (s *line) isBlank() bool

isDigit function #

func isDigit(c byte) bool

isHR function #

func isHR(s line) bool

isHexDigit function #

func isHexDigit(c byte) bool

isLDH function #

func isLDH(c byte) bool

isLetter function #

func isLetter(c byte) bool

isLetterDigit function #

func isLetterDigit(c byte) bool

isPunct function #

func isPunct(c byte) bool

isScheme function #

func isScheme(c byte) bool

isTableSpace function #

func isTableSpace(c byte) bool

isTableStart function #

func isTableStart(hdr1 string, delim1 string) bool

isURL function #

func isURL(c byte) bool

isUnicodePunct function #

func isUnicodePunct(r rune) bool

isUnicodeSpace function #

func isUnicodeSpace(r rune) bool

isUser function #

func isUser(c byte) bool

last method #

func (p *parseState) last() Block

linkCorner function #

func linkCorner(url string) bool

listCorner function #

func listCorner(list *List) bool

longestSequence function #

longestSequence returns the length of the longest sequence of consecutive bytes b in s.

func longestSequence(s string, b byte) int

mdUnescape function #

func mdUnescape(s string) string

mergePlain method #

func (p *parseState) mergePlain(list []Inline) []Inline

mergePlain1 function #

func mergePlain1(list []Inline) *Plain

newATXHeading function #

func newATXHeading(p *parseState, s line) (line, bool)

newFence function #

func newFence(p *parseState, s line) (line, bool)

newHR function #

func newHR(p *parseState, s line) (line, bool)

newHTML function #

func newHTML(p *parseState, s line) (line, bool)

newListItem function #

func newListItem(p *parseState, s line) (line, bool)

newPara function #

func newPara(p *parseState, s line) (line, bool)

newPre function #

func newPre(p *parseState, s line) (line, bool)

newQuote function #

func newQuote(p *parseState, s line) (line, bool)

newSetextHeading function #

func newSetextHeading(p *parseState, s line) (line, bool)

newText method #

func (p *parseState) newText(pos Position, text string) *Text

nextB method #

func (p *parseState) nextB() blockBuilder

nop function #

func nop(text string) string

normalizeLabel function #

func normalizeLabel(s string) string

para method #

func (p *parseState) para() *paraBuilder

parse method #

func (p *Parser) parse(text string) (d *Document, corner bool)

parseAlign method #

func (b *tableBuilder) parseAlign(delim tableTrimmed, n int) []string

parseAttr function #

func parseAttr(p *parseState, s string, i int) (string, int, bool)

parseAttrName function #

func parseAttrName(s string, i int) (string, int, bool)

parseAttrValue function #

func parseAttrValue(s string, i int) (string, int, bool)

parseAttrValueSpec function #

func parseAttrValueSpec(p *parseState, s string, i int) (string, int, bool)

parseAutoEmail method #

func (p *parseState) parseAutoEmail(s string, i int) (before string, link *Link, after string, ok bool)

parseAutoHTTP method #

parseAutoWWW parses an extended www autolink. https://github.github.com/gfm/#extended-www-autolink

func (p *parseState) parseAutoHTTP(scheme string, s string, textstart int, start int, min int, vd *validDomainChecker) (link *Link, after string, found bool)

parseAutoLinkEmail function #

func parseAutoLinkEmail(s string, i int) (Inline, int, bool)

parseAutoLinkOrHTML function #

func parseAutoLinkOrHTML(p *parseState, s string, i int) (Inline, int, int, bool)

parseAutoLinkURI function #

func parseAutoLinkURI(s string, i int) (Inline, int, bool)

parseAutoMailto method #

func (p *parseState) parseAutoMailto(s string, i int) (link *Link, after string, ok bool)

parseAutoProto method #

func (p *parseState) parseAutoProto(s string, i int, vd *validDomainChecker) (link *Link, after string, found bool)

parseAutoXmpp method #

func (p *parseState) parseAutoXmpp(s string, i int) (link *Link, after string, ok bool)

parseBreak function #

func parseBreak(_ *parseState, s string, i int) (Inline, int, int, bool)

parseCodeSpan method #

func (b *backtickParser) parseCodeSpan(p *parseState, s string, i int) (Inline, int, int, bool)

parseDash function #

func parseDash(p *parseState, s string, i int) (Inline, int, int, bool)

parseDot function #

func parseDot(p *parseState, s string, i int) (Inline, int, int, bool)

parseEmoji function #

func parseEmoji(p *parseState, s string, i int) (Inline, int, int, bool)

parseEmph function #

func parseEmph(p *parseState, s string, i int) (Inline, int, int, bool)

parseEscape function #

func parseEscape(p *parseState, s string, i int) (Inline, int, int, bool)

parseHTMLCDATA function #

func parseHTMLCDATA(s string, i int) (Inline, int, bool)

parseHTMLClosingTag function #

func parseHTMLClosingTag(p *parseState, s string, i int) (Inline, int, bool)

parseHTMLComment function #

func parseHTMLComment(s string, i int) (Inline, int, bool)

parseHTMLDecl function #

func parseHTMLDecl(p *parseState, s string, i int) (Inline, int, bool)

parseHTMLEntity function #

func parseHTMLEntity(_ *parseState, s string, i int) (Inline, int, int, bool)

parseHTMLMarker function #

func parseHTMLMarker(s string, i int, prefix string, suffix string) (Inline, int, bool)

parseHTMLOpenTag function #

func parseHTMLOpenTag(p *parseState, s string, i int) (Inline, int, bool)

parseHTMLProcInst function #

func parseHTMLProcInst(s string, i int) (Inline, int, bool)

parseHTMLTag function #

func parseHTMLTag(p *parseState, s string, i int) (Inline, int, bool)

parseImageOpen function #

func parseImageOpen(_ *parseState, s string, i int) (Inline, int, int, bool)

parseLinkClose method #

func (p *parseState) parseLinkClose(s string, i int, open *openPlain) (*Link, int, bool)

parseLinkDest function #

func parseLinkDest(s string, i int) (string, int, bool)

parseLinkLabel function #

func parseLinkLabel(p *parseState, s string, i int) (string, int, bool)

parseLinkOpen function #

func parseLinkOpen(_ *parseState, s string, i int) (Inline, int, int, bool)

parseLinkRefDef function #

func parseLinkRefDef(p buildState, s string) (int, bool)

parseLinkTitle function #

func parseLinkTitle(s string, i int) (title string, char byte, next int, found bool)

parseRow method #

func (b *tableBuilder) parseRow(p buildState, row tableTrimmed, line int, width int) []*Text

parseTagName function #

func parseTagName(s string, i int) (string, int, bool)

parseValidDomain method #

parseValidDomain parses a valid domain. https://github.github.com/gfm/#valid-domain If s starts with a valid domain, parseValidDomain returns the length of that domain and true. If s does not start with a valid domain, parseValidDomain returns n, false, where n is the length of a prefix guaranteed not to be acceptable to any future call to parseValidDomain. “A valid domain consists of segments of alphanumeric characters, underscores (_) and hyphens (-) separated by periods (.). There must be at least one period, and no underscores may be present in the last two segments of the domain.” The spec does not spell out whether segments can be empty. Empirically, in GitHub's implementation they can.

func (v *validDomainChecker) parseValidDomain(start int) (n int, found bool)

peek method #

func (s *line) peek() byte

pos method #

func (p *parseState) pos() Position

printLinkTitleMarkdown function #

func printLinkTitleMarkdown(buf *bytes.Buffer, title string, titleChar byte)

printMarkdown method #

func (b *Quote) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *Image) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *CodeBlock) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (t *Table) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *AutoLink) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *Heading) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *Link) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (x *Task) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *HTMLBlock) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *Emph) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (x *Del) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *Empty) printMarkdown(*bytes.Buffer, mdState)

printMarkdown method #

func (x *Strong) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *Paragraph) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *Code) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (x *Escaped) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (x *Plain) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (x *HTMLTag) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *List) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (b *Document) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *SoftBreak) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *Text) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *HardBreak) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *Item) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdown method #

func (x *Emoji) printMarkdown(buf *bytes.Buffer)

printMarkdown method #

func (b *ThematicBreak) printMarkdown(buf *bytes.Buffer, s mdState)

printMarkdownBlocks function #

func printMarkdownBlocks(bs []Block, buf *bytes.Buffer, s mdState)

printRemainingMarkdown method #

func (x *Link) printRemainingMarkdown(buf *bytes.Buffer)

printb function #

func printb(buf *bytes.Buffer, b Block, prefix string)

printi function #

func printi(buf *bytes.Buffer, in Inline)

printis function #

func printis(buf *bytes.Buffer, ins []Inline)

printslice function #

func printslice(buf *bytes.Buffer, v reflect.Value, prefix string)

reset method #

func (b *backtickParser) reset()

skip method #

func (v *validDomainChecker) skip(i int)

skip method #

func (p *parseState) skip(i int)

skipDomainElem function #

func skipDomainElem(s string) (int, bool)

skipSpace function #

func skipSpace(s string, i int) int

skipSpace method #

func (s *line) skipSpace()

start method #

func (b *tableBuilder) start(hdr string, delim string)

startHTML method #

func (p *parseState) startHTML(s *line) bool

startListItem method #

func (p *parseState) startListItem(s *line) bool

string method #

func (s *line) string() string

tableAlign function #

func tableAlign(cell string) string

tableCount function #

func tableCount(row tableTrimmed) int

tableTrimOuter function #

func tableTrimOuter(row string) tableTrimmed

tableTrimSpace function #

func tableTrimSpace(s string) string

tableUnescape function #

func tableUnescape(text string) string

taskList method #

func (p *parseState) taskList(list *List)

toPlain function #

func toPlain(x Inline) *Plain

trim method #

func (s *line) trim(c byte) bool

trimFence method #

func (s *line) trimFence(fence *string, info *string, n *int) bool

trimHeading method #

func (s *line) trimHeading(width *int) bool

trimLeftSpaceTab function #

func trimLeftSpaceTab(s string) string

trimQuote function #

func trimQuote(s line) (line, bool)

trimRightSpaceTab function #

func trimRightSpaceTab(s string) string

trimSetext method #

func (s *line) trimSetext(n *int) bool

trimSpace method #

func (s *line) trimSpace(min int, max int, eolOK bool) bool

trimSpace function #

func trimSpace(s string) string

trimSpaceString method #

func (s *line) trimSpaceString() string

trimSpaceTab function #

func trimSpaceTab(s string) string

trimSpaceTabNewline function #

func trimSpaceTabNewline(s string) string

trimStack method #

func (p *parseState) trimStack(depth int)

trimString method #

func (s *line) trimString() string

Generated with Arrow