3 ms·
Anyone know of a good markdown viewer that is formatted instead of showing the source with colors? I'm using pandoc to convert it to groff and read it like a f
by h1d 8y ago
Anyone know of a good markdown viewer that is formatted instead of showing the source with colors?
I'm using pandoc to convert it to groff and read it like a formatted man page, which is ok but not great as it loses some formatting.
pandoc -s -f markdown -t man markdown.md | groff -T utf8 -man | less -R
- dhamidi 8y agoActually plain less works quite well when using filters: #!/bin/bash # ~/.lessfilter case $1 in *.md) view-md $1;; *.json) jq -C . $1;; *) pygmentize $1;; esac Where view-md is just a thin wrapper around tty-markdown[1]: #!/usr/bin/env ruby require 'tty-markdown' puts TTY::Markdown.parse(ARGF.read, colors: 256) [1]: https://github.com/piotrmurach/tty-markdown https://github.com/piotrmurach/tty-markdown