Golang library for converting Markdown to HTML. Good documentation is included.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Leonid Maslakov 540c572d53 Update CHANGELOG.md 1 year ago
.github Update GitHub Actions 2 years ago
docs Add open code block with any number of chars 2 years ago
v2 Build(deps): Bump github.com/lcomrade/highlight in /v2 1 year ago
CHANGELOG.md Update CHANGELOG.md 1 year ago
LICENSE first commit 2 years ago
README.md Update CHANGELOG.md and README.md 2 years 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