markdown/doc.go

23 lines
764 B
Go
Raw Normal View History

2018-01-26 08:43:10 +00:00
// Package markdown implements markdown parser and HTML renderer.
//
2018-01-26 08:43:10 +00:00
// It parses markdown into AST format which can be serialized to HTML
// (using HTMLRenderer) or possibly other formats (using alternate renderers).
//
//
// Convert markdown to HTML
//
// md := []byte("## markdown document")
// html := ToHTML(md, nil, nil)
2018-01-26 08:43:10 +00:00
//
// Customizing parsing and HTML rendering
//
2018-01-26 22:46:57 +00:00
// md := []byte("markdown document")
// extensions := CommonExtensions | AutoHeadingIDs
// parser := NewParserWithExensions(extensions)
// htmlParams := CommonHTMLFlags | HrefTargetBlank
// renderer := NewHTMLRenderer(htmlParams)
// html := ToHTML(md, parser, renderer)
//
// For a cmd-line tool see https://github.com/gomarkdown/markdown/tree/master/cmd/mdtohtml
2018-01-25 21:01:19 +00:00
package markdown