markdown/doc.go

25 lines
346 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 (
md "github.com/knieriem/markdown"
2010-11-21 22:04:39 +00:00
"os"
"bufio"
)
func main() {
2012-04-21 20:37:54 +00:00
doc := md.Parse(os.Stdin, md.Options{Smart: true})
2010-11-21 22:04:39 +00:00
w := bufio.NewWriter(os.Stdout)
doc.WriteHtml(w)
w.Flush()
}
[1]: https://github.com/jgm/peg-markdown/
*/
package markdown