mirror of https://github.com/lcomrade/md2html.git
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.
|
1 year ago | |
---|---|---|
.github | 2 years ago | |
docs | 2 years ago | |
v2 | 1 year ago | |
CHANGELOG.md | 1 year ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago |
README.md
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
- Offline documentation:
go doc -all github.com/lcomrade/md2html
- Online documentation
- Markdown Syntax Guide
- Changelog