Golang library for converting Markdown to HTML. Good documentation is included.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lcomrade 540c572d53 Update CHANGELOG.md 4 weeks ago
.github Update GitHub Actions 2 months ago
docs Add open code block with any number of chars 2 months ago
v2 Build(deps): Bump github.com/lcomrade/highlight in /v2 4 weeks ago
CHANGELOG.md Update CHANGELOG.md 4 weeks ago
LICENSE first commit 5 months ago
README.md Update CHANGELOG.md and README.md 2 months ago

README.md

Go report Go Reference Release License

md2html is a golang library for converting Markdown to HTML.

Install

Supported Go versions:

  • 1.11
  • 1.17
  • 1.18

Add to go.mod file:

require github.com/lcomrade/md2html/v2 v2

Example

package main

import(
	"github.com/lcomrade/md2html/v2"
)

const myMarkdown = `
# Title
Some text here.

*Italic*
**Bold**
~~Strikethrough~~

1. level 1
2. level 1
3. level 1
    1. level 2
    2. level 2
        1. level 3
        2. level 3
`

func main() {
	result := md2html.Convert(myMarkdown)
	println(result)
}

Documentation