MichaelMure/go-term-markdown
소개
A markdown renderer package for the terminal
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalgo-term-markdown
go-term-markdown is a go package implementing a Markdown renderer for the terminal.
Note: Markdown being originally designed to render as HTML, rendering in a terminal is occasionally challenging and some adaptation had to be made.
Features:
- formatting
- lists
- tables
- images
- code blocks with syntax highlighting
- basic HTML support
Note: this renderer is packaged as a standalone terminal viewer at https://github.com/MichaelMure/mdr/
Usage
import (
"fmt"
"io/ioutil"
markdown "github.com/MichaelMure/go-term-markdown"
)
func main() {
path := "Readme.md"
source, err := ioutil.ReadFile(path)
if err != nil {
panic(err)
}
result := markdown.Render(string(source), 80, 6)
fmt.Println(result)
}
Example
Here is the Readme of go-term-text rendered with go-term-markdown:

Here is an example of table rendering:

Origin
This package has been extracted from the git-bug project. As such, its aim is to support this project and not to provide an all-in-one solution. Contributions or full-on takeover as welcome though.
Contribute
PRs accepted.
License
MIT
관련 프로젝트 살펴보기
불러오는 중…
