在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):MichaelMure/go-term-markdown开源软件地址(OpenSource Url):https://github.com/MichaelMure/go-term-markdown开源编程语言(OpenSource Language):Go 99.7%开源软件介绍(OpenSource Introduction):go-term-markdown
Note: Markdown being originally designed to render as HTML, rendering in a terminal is occasionally challenging and some adaptation had to be made. Features:
Note: this renderer is packaged as a standalone terminal viewer at https://github.com/MichaelMure/mdr/ Usageimport (
"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)
} ExampleHere is the Readme of Here is an example of table rendering: OriginThis 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. ContributePRs accepted. LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论