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
- Host: GitHub
- URL: https://github.com/matsuyoshi30/gom2h
- Owner: matsuyoshi30
- License: mit
- Created: 2020-03-09T02:17:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T17:00:59.000Z (almost 5 years ago)
- Last Synced: 2025-04-04T14:15:30.110Z (about 1 year ago)
- Topics: clitools, css, go, golang, html, markdown
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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