markdown/doc.go

25 lines
374 B
Go
Raw Normal View History

2010-11-21 22:04:39 +00:00
/*
A translation of peg-markdown [1] into Go.
Usage example:
package main
2010-11-21 22:04:39 +00:00
import (
"github.com/knieriem/markdown"
2010-11-21 22:04:39 +00:00
"os"
"bufio"
)
func main() {
2012-05-04 14:20:29 +00:00
p := markdown.NewParser(&markdown.Extensions{Smart: true})
2010-11-21 22:04:39 +00:00
w := bufio.NewWriter(os.Stdout)
p.Markdown(os.Stdin, markdown.ToHTML(w))
2010-11-21 22:04:39 +00:00
w.Flush()
}
[1]: https://github.com/jgm/peg-markdown/
*/
package markdown