-
-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ANSI output format #362
Comments
I implemented something like this in the
It would certainly be possible to add something like that to cmark, though it's not a priority for me. |
Am I reading that right that you all are open to a contribution from this? I would port over https://github.com/kristapsdz/lowdown/blob/master/term.c This would allow Nix to switch to |
I'm happy with mentioned 😊 |
I need a library version, so I am hoping that the commonmark maintainers are happy with that :) |
@jgm I actually don't have any issue with the the (That said, FWIW our current terminal rendering from |
Personally I want to state that such style of documentation for CLI tools is worst-case - it is neither man nor help, you're forcing user to pipe output to pager and leaving out man convetions (no one interested in following them because "help files" is written in Markdown, and typical markdown user is rarely even avare of existence of manual pages, and their conventions). |
@tribals I didn't event these requirements :). I'm just trying to swap up one markdown library for another one so I can (a) programmatically create docs (b) get windows support, without loosing features. |
Currently, there is
man
output format (-t, --to
). It can be viewed using something like$ cmark -t man < README.md | man -l -
Unfortunately, produced output is absolutely unreadable, unless it follows closely man pages conventions, eg, declares all required sections (
NAME
,SYNOPSIS
, etc). This is very unfortunate situation when most of README's you're reading is from public git repositories.However, displaying nicely formatted, colored Markdown in terminal is possible, using ANSI "formatting" sequences. Here is example of such representation:
(Colors are a bit weird, but this is just illustration)
So, it would be nice to have ANSI as supported output format. What do you think?
The text was updated successfully, but these errors were encountered: