Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonHtml2MdConverter ¶
type CommonHtml2MdConverter struct {
Option *Option
}
func (*CommonHtml2MdConverter) Convert ¶
func (hc *CommonHtml2MdConverter) Convert(data []byte) (markdown []byte, err error)
Convert 采用三方库 https://github.com/JohannesKaufmann/html-to-markdown 进行转换
type ContentType ¶
type ContentType int
const (
HTML ContentType = iota
)
func GetContentTypeByString ¶
func GetContentTypeByString(contentType string) ContentType
type Html2MdConverter ¶
type Html2MdConverter interface { // Convert 将指定的数据转换为markdown并返回, // 如果转换中出错,则会返回error Convert(data []byte) ([]byte, error) }
Html2MdConverter 数据转换器,会将指定的数据转换为markdown字节流
func NewConverter ¶
func NewConverter(contentType ContentType, option *Option) Html2MdConverter
Click to show internal directories.
Click to hide internal directories.