convert markdown to html
As a cli tool
$ go get -u github.com/matsuyoshi30/gom2h/cmd/gom2h # Installation
$ gom2h <path/to/markdownfile>
$ gom2h -css <path/to/cssfile> <path/to/markdownfile> # specify css
As a go library
$ go get -u github.com/matsuyoshi30/gom2h # Installation
import (
"fmt"
"github.com/matsuyoshi30/gom2h"
)
func main() {
output, err := gom2h.Run([]byte(`### Header3 with *em* and **strong**`))
if err != nil {
fmt.Println(err)
}
fmt.Println(string(output)) // -> <h3>Header3 with <em>em</em> and <strong>strong</strong></h3>
}
- Header
- Paragraph
- Emphasis
- Strong
- Link
- List (Unorder)
- Code Block
- Syntax highlight (only when converting file)
MIT