Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockQuote ¶
type BlockQuote struct {
// contains filtered or unexported fields
}
func NewBlockQuote ¶
func NewBlockQuote(s *goquery.Selection) *BlockQuote
func (*BlockQuote) Markdown ¶
func (bq *BlockQuote) Markdown() string
type CodeBlock ¶
type CodeBlock struct {
// contains filtered or unexported fields
}
func NewCodeBlock ¶
type Element ¶
type Element interface { Type() ElementType Markdown() string }
func NewElement ¶
func NewElement(elementType ElementType, text string) Element
func NewHeading ¶
func NewListItem ¶
func NewParagraph ¶
type ElementType ¶
type ElementType int
const ( ElementTypeParagraph ElementType = iota ElementTypeHeading ElementTypeAnchor ElementTypeList ElementTypeListItem )
type Heading ¶
Heading represents a Markdown heading element. Example: # Heading 1 ## Heading 2 ### Heading 3
func (Heading) Type ¶
func (h Heading) Type() ElementType
type ListItem ¶
type ListItem struct {
Content string
}
func (*ListItem) Type ¶
func (li *ListItem) Type() ElementType
type MarkdownDocument ¶
type MarkdownDocument interface { // Content returns the Markdown representation of the HTML document. Content() (string, error) // RemoveMatches scans the Markdown document for any elements whose // Markdown content matches the given regex pattern and removes them. RemoveMatches(*regexp.Regexp) }
func NewDocument ¶
func NewDocument(rawHtml string) MarkdownDocument
type Paragraph ¶
type Paragraph struct {
Content string
}
func (Paragraph) Type ¶
func (p Paragraph) Type() ElementType
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func (*Text) Strikethrough ¶
Click to show internal directories.
Click to hide internal directories.