Skip to content

convert markdown to html using standard library only

License

Notifications You must be signed in to change notification settings

matsuyoshi30/gom2h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gom2h

convert markdown to html

Usage

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

default 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>
}

Support

  • Header
  • Paragraph
  • Emphasis
  • Strong
  • Link
  • List (Unorder)
  • Code Block
    • Syntax highlight (only when converting file)

License

MIT

About

convert markdown to html using standard library only

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages