1.3 KiB
layout | title | excerpt |
---|---|---|
post | Markdown Support | A side effect of fancier help text |
(This change will be in the upcoming v0.11.0 release)
As part of the effort to polish the lnav TUI, I wanted to make the builtin help text look a bit nicer. The current help text is a plain text file with some ANSI escape sequences for colors. It's not easy to write or read. Since Markdown has become a dominant way to write this type of document, I figured I could use that and have the side benefit of allowing lnav to read Markdown docs. Fortunately, the MD4C library exists. This library provides a nice event-driven parser for documents instead of just converting directly to HTML. In addition, document structure is now shown/navigable through the new breadcrumb bar at the top. I think the result is pretty nice:
Viewing Markdown Files
Files with an .md
suffix will be considered as Markdown and will be
parsed as such. As an example, here is lnav displaying its README.md file: