glow icon indicating copy to clipboard operation
glow copied to clipboard

Option to ignore reference-style links

Open rdnlsmith opened this issue 3 years ago • 2 comments

I use Markdown syntax when writing git commit messages, and I would love to use glow as a pager for git log. This works pretty well:

git log --pretty="format:'## %s (%h)%n%n_%aN | %ah_%n%n%b'" | glow -p -w 80 -

Except that I use reference-style links, to avoid breaking the flow of text when I need to read the log without the benefit of Markdown rendering:

For example, this is a body paragraph with a [link to some docs][1]
related to the changes in some commit.

[1]: https://example.com

This is fine for viewing a single commit, but if I pipe git log through glow as above, the URLs from the topmost commits get inserted into every commit message that includes a link with the same number. It would be really great if there were a flag I could use to leave these links as they are in the raw text!

rdnlsmith avatar May 18 '22 13:05 rdnlsmith

Huge links in the middle of a paragraph really do break the flow of text.
An option to preserve reference links would improve the readability.
Maybe even converting all links into reference links can look great.

WieeRd avatar Jul 21 '22 10:07 WieeRd

| Maybe even converting all links into reference links can look great.

Found a tool for that, doesn't seem to be maintained or complete, though.
https://github.com/sayanarijit/md-footer

WieeRd avatar Jul 21 '22 10:07 WieeRd