md

package
v0.0.2-0...-27ad42c Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackFriday

type BlackFriday struct {
	Option blackfriday.Extensions
}

BlackFriday Markdown解析器 https://github.com/russross/blackfriday

func NewBlackFriday

func NewBlackFriday() *BlackFriday

NewBlackFriday 初始化一个BlackFriday解析器

func (*BlackFriday) Markdown2HTML

func (p *BlackFriday) Markdown2HTML(mdfile string) (html string, err error)

Markdown2HTML 将指定目录位置的markdown文件,解析生成html文档

func (*BlackFriday) Parse

func (p *BlackFriday) Parse(input []byte) (html []byte)

Parse 通过BlackFriday解析器解析MD

type Parser

type Parser interface {
	// Parse 通过解析器解析MD,
	Parse(md []byte) (html []byte)

	// MarkdownHTML 基于解析器生成的html字符串内容
	// 1. 读取目录文件,筛选包含以md文件结尾的markdown文件
	// 2. 并发的利用md解析lib来生成html源文件返回
	Markdown2HTML(mdfile string) (html string, err error)
}

Parser markdown解析器

Jump to

Keyboard shortcuts

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