shurcooL/markdownfmt

Feature Request: markdownfmt: Use terminal's styling markup, when available.

dmitshur opened this issue · 0 comments

Currently, bold text is represented as **bold** text in output of markdownfmt. For example:

image

However, when outputting to a terminal that supports styles, markdownfmt could emit the codes to use styles to render bold text as actually bold. For example:

image

Only markdownfmt the binary should do this, the markdownfmt/markdown library should have an option to control this. But markdownfmt the binary can use golang.org/x/crypto/ssh/terminal package's IsTerminal to detect if stdout is a terminal.

Any thoughts on this?