57 lines
1018 B
Markdown
57 lines
1018 B
Markdown
# 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
|
|
- Links
|
|
- Lists
|
|
- Headers
|
|
- Paragraphs
|
|
- Quotes
|
|
- Tables
|
|
|
|
## Installation
|
|
|
|
```shell
|
|
go get git.akyoto.dev/go/markdown
|
|
```
|
|
|
|
## Usage
|
|
|
|
```go
|
|
html := markdown.Render("# Header")
|
|
```
|
|
|
|
## Tests
|
|
|
|
```
|
|
PASS: TestEmpty
|
|
PASS: TestParagraph
|
|
PASS: TestHeader
|
|
PASS: TestLink
|
|
PASS: TestList
|
|
PASS: TestTables
|
|
PASS: TestCode
|
|
PASS: TestQuote
|
|
PASS: TestCombined
|
|
PASS: TestSecurity
|
|
coverage: 100.0% of statements
|
|
```
|
|
|
|
## Benchmarks
|
|
|
|
```
|
|
BenchmarkSmall-12 8899971 131.5 ns/op 32 B/op 1 allocs/op
|
|
BenchmarkMedium-12 980007 1217 ns/op 512 B/op 1 allocs/op
|
|
BenchmarkLarge-12 315229 3554 ns/op 2560 B/op 2 allocs/op
|
|
```
|
|
|
|
## License
|
|
|
|
Please see the [license documentation](https://akyoto.dev/license).
|
|
|
|
## Copyright
|
|
|
|
© 2024 Eduard Urbach |