2010-11-21 22:04:39 +00:00
|
|
|
/*
|
|
|
|
A translation of peg-markdown [1] into Go.
|
|
|
|
|
|
|
|
Usage example:
|
|
|
|
|
2012-04-20 23:19:46 +00:00
|
|
|
package main
|
|
|
|
|
2010-11-21 22:04:39 +00:00
|
|
|
import (
|
2012-04-20 23:19:46 +00:00
|
|
|
md "github.com/knieriem/markdown"
|
2010-11-21 22:04:39 +00:00
|
|
|
"os"
|
|
|
|
"bufio"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2012-04-20 23:19:46 +00:00
|
|
|
doc := md.Parse(os.Stdin, md.Extensions{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
|