markdown

package
v0.3.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL