glamour icon indicating copy to clipboard operation
glamour copied to clipboard

Option to ignore reference-style links

Open rdnlsmith opened this issue 2 years ago • 5 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