Home

Awesome

Html2md is a Go library for converting html to markdown.

Installation

If you have gopm installed,

gopm get github.com/lunny/html2md

Or

go get github.com/lunny/html2md

Usage

    md := html2md.Convert(html)
   html2md.AddRule(&html2md.Rule{
       patterns: []string{"hr"},
	   tp:       Void,
	   replacement: func(innerHTML string, attrs []string) string {
			return "\n\n* * *\n"
		},
   })

or

html2md.AddConvert(func(content string) string {
    return strings.ToLower(content)
})

Docs

LICENSE

BSD License http://creativecommons.org/licenses/BSD/