26 lines
351 B
Go
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
|