diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:44:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:44:55 +0000 |
commit | 5068d34c08f951a7ea6257d305a1627b09a95817 (patch) | |
tree | 08213e2be853396a3b07ce15dbe222644dcd9a89 /docs/_posts/2022-08-06-markdown-support.md | |
parent | Initial commit. (diff) | |
download | lnav-upstream.tar.xz lnav-upstream.zip |
Adding upstream version 0.11.1.upstream/0.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/_posts/2022-08-06-markdown-support.md')
-rw-r--r-- | docs/_posts/2022-08-06-markdown-support.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/_posts/2022-08-06-markdown-support.md b/docs/_posts/2022-08-06-markdown-support.md new file mode 100644 index 0000000..4504bbd --- /dev/null +++ b/docs/_posts/2022-08-06-markdown-support.md @@ -0,0 +1,33 @@ +--- +layout: post +title: Markdown Support +excerpt: 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](https://github.com/mity/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: + +<script id="asciicast-2hx3UiyzOHQXBQOBf31ztKvHc" + src="https://asciinema.org/a/2hx3UiyzOHQXBQOBf31ztKvHc.js" + async> +</script> + +## 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: + +<script id="asciicast-iw4rwddZNGCe3v8DyOfItERG9" + src="https://asciinema.org/a/iw4rwddZNGCe3v8DyOfItERG9.js" + async> +</script> |