📃 Markdown renderer.
18 Commits
testdata | ||
.gitignore | ||
benchmarks_test.go | ||
go.mod | ||
go.sum | ||
README.md | ||
Render_test.go | ||
Render.go |
markdown
A markdown renderer that supports only a subset of the CommonMark spec in order to make the rendering more efficient and the syntax more consistent.
Features
- Code blocks
- Formatting (bold, italic, monospace)
- Links
- Lists
- Headers
- Paragraphs
- Quotes
- Separators
- Tables
Installation
go get git.akyoto.dev/go/markdown
Usage
html := markdown.Render("# Header")
Tests
PASS: TestEmpty
PASS: TestParagraph
PASS: TestHeader
PASS: TestItalic
PASS: TestBold
PASS: TestLink
PASS: TestList
PASS: TestTables
PASS: TestCode
PASS: TestQuote
PASS: TestSeparator
PASS: TestCombined
PASS: TestSecurity
coverage: 100.0% of statements
Benchmarks
BenchmarkSmall-12 5986922 187.5 ns/op 32 B/op 1 allocs/op
BenchmarkMedium-12 1000000 1077 ns/op 512 B/op 1 allocs/op
BenchmarkLarge-12 255178 4055 ns/op 2560 B/op 2 allocs/op
License
Please see the license documentation.
Copyright
© 2024 Eduard Urbach