markdown/doc.go
Michael Teichgräber 7a083c5dae initial import
2010-11-21 23:04:39 +01:00

26 lines
351 B
Go

/*
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