An open API service indexing awesome lists of open source software.

https://github.com/matsuyoshi30/gom2h

convert markdown to html using standard library only
https://github.com/matsuyoshi30/gom2h

clitools css go golang html markdown

Last synced: 2 months ago
JSON representation

convert markdown to html using standard library only

Awesome Lists containing this project

README

          

# gom2h

convert markdown to html

## Usage

As a cli tool

```
$ go get -u github.com/matsuyoshi30/gom2h/cmd/gom2h # Installation

$ gom2h

$ gom2h -css # specify css
```

[default css](https://github.com/sindresorhus/github-markdown-css)

---

As a go library

```
$ go get -u github.com/matsuyoshi30/gom2h # Installation
```

```go
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)) // ->

Header3 with em and strong


}
```

## Support

- [x] Header
- [x] Paragraph
- [x] Emphasis
- [x] Strong
- [x] Link
- [x] List (Unorder)
- [x] Code Block
- [x] Syntax highlight (only when converting file)

## License

MIT