Documentation ¶
Overview ¶
Package markdown provides a Markdown renderer.
Example ¶
package main import ( "log" "os" "github.com/shurcooL/markdownfmt/markdown" ) func main() { input := []byte(`Title = This is a new paragraph. I wonder if I have too many spaces. What about new paragraph. But the next one... Is really new. 1. Item one. 1. Item TWO. Final paragraph. `) output, err := markdown.Process("", input, nil) if err != nil { log.Fatalln(err) } os.Stdout.Write(output) }
Output: Title ===== This is a new paragraph. I wonder if I have too many spaces. What about new paragraph. But the next one... Is really new. 1. Item one. 2. Item TWO. Final paragraph.
Example (Two) ¶
package main import ( "log" "os" "github.com/shurcooL/markdownfmt/markdown" ) func main() { input := []byte(`Title == Subtitle --- How about ` + "`this`" + ` and other stuff like *italic*, **bold** and ***super extra***. `) output, err := markdown.Process("", input, nil) if err != nil { log.Fatalln(err) } os.Stdout.Write(output) }
Output: Title ===== Subtitle -------- How about `this` and other stuff like *italic*, **bold** and ***super extra***.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRenderer ¶
func NewRenderer(opt *Options) blackfriday.Renderer
NewRenderer returns a Markdown renderer. If opt is nil the defaults are used.
Types ¶
Click to show internal directories.
Click to hide internal directories.