markdown/doc.go

26 lines
351 B
Go
Raw Normal View History

2010-11-21 22:04:39 +00:00
/*
A translation of peg-markdown [1] into Go.
Usage example:
import (
md "markdown"
"os"
"io/ioutil"
"bufio"
)
func main() {
b, _ := ioutil.ReadAll(os.Stdin)
doc := md.Parse(string(b), md.EXT_SMART)
w := bufio.NewWriter(os.Stdout)
doc.WriteHtml(w)
w.Flush()
}
[1]: https://github.com/jgm/peg-markdown/
*/
package markdown