Documentation ¶
Index ¶
- func ToHTML(b Block) string
- func ToMarkdown(b Block) string
- type AutoLink
- type Block
- type Code
- type CodeBlock
- type Del
- type Document
- type Emoji
- type Emph
- type Empty
- type Escaped
- type HTMLBlock
- type HTMLTag
- type HardBreak
- type Heading
- type Image
- type Inline
- type Item
- type Link
- type List
- type Paragraph
- type Parser
- type Plain
- type Position
- type Quote
- type SoftBreak
- type Strong
- type Table
- type Task
- type Text
- type ThematicBreak
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMarkdown ¶
Types ¶
type Block ¶
type Block interface { Pos() Position PrintHTML(buf *bytes.Buffer) // contains filtered or unexported methods }
Block is implemented by:
CodeBLock Document Empty HTMLBlock Heading Item List Paragraph Quote Text ThematicBreak
type Emoji ¶
type Heading ¶
type Image ¶
type Link ¶
type Parser ¶
type Parser struct { // HeadingIDs determines whether the parser accepts // the {#hdr} syntax for an HTML id="hdr" attribute on headings. // For example, if HeadingIDs is true then the Markdown // ## Overview {#overview} // will render as the HTML // <h2 id="overview">Overview</h2> HeadingIDs bool // Strikethrough determines whether the parser accepts // ~abc~ and ~~abc~~ as strikethrough syntax, producing // <del>abc</del> in HTML. Strikethrough bool // TaskListItems determines whether the parser accepts // “task list items” as defined in GitHub Flavored Markdown. // When a list item begins with the plain text [ ] or [x] // that turns into an unchecked or checked check box. TaskListItems bool // TODO AutoLinkText bool AutoLinkAssumeHTTP bool // TODO Table bool // TODO Emoji bool // TODO SmartDot bool SmartDash bool SmartQuote bool }
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 Table ¶
type ThematicBreak ¶
type ThematicBreak struct { Position // contains filtered or unexported fields }
func (*ThematicBreak) PrintHTML ¶
func (b *ThematicBreak) PrintHTML(buf *bytes.Buffer)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.