Documentation ¶ Index ¶ type MdOption func MdWithSummaryLength(summaryLength int) MdOption func MdWithTOC() MdOption func MdWithThumb(md *SimpleMd) MdOption type MdResult type SimpleMd func NewMd(options ...MdOption) *SimpleMd func (this *SimpleMd) Run(mdText string) *MdResult Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type MdOption ¶ type MdOption func(*SimpleMd) option func MdWithSummaryLength ¶ func MdWithSummaryLength(summaryLength int) MdOption 生成摘要的长度 func MdWithTOC ¶ func MdWithTOC() MdOption 开启toc func MdWithThumb ¶ func MdWithThumb(md *SimpleMd) MdOption 开启缩略图 type MdResult ¶ type MdResult struct { ContentHtml string // 内容 SummaryText string // 摘要 TocHtml string // TOC目录 ThumbUrl string // 缩略图 } type SimpleMd ¶ type SimpleMd struct { // contains filtered or unexported fields } simple md func NewMd ¶ func NewMd(options ...MdOption) *SimpleMd new simple md func (*SimpleMd) Run ¶ func (this *SimpleMd) Run(mdText string) *MdResult run Source Files ¶ View all Source files doc.gomarkdown.go Click to show internal directories. Click to hide internal directories.