# Markdown viewer — Liu Terminal

> Liu Terminal markdown viewer. Render .md files in-terminal with live preview, syntax highlighting, and GitHub-style formatting.

URL: https://liu.software/docs/markdown/  
Language: en  
Updated: 2026-10-17

Read READMEs, design notes and agent output inside Liu — styled rendering with images, tables, task lists, wikilinks and code blocks, plus a raw-source toggle and in-document find.

**Under rewrite.** Parser and renderer live in src/ui/markdown/ (md\_parse.c, md\_render.c, md\_image.c, md\_graph.c, md\_math.c, md\_diagram.c). The viewer integration is in src/ui/filebrowser.c — expect AST shapes and image pipelines to change.

## Open a document

Click any .md or .markdown file in the file browser. Liu parses the buffer in-place (AST slices point into the loaded file text), renders glyphs through the same terminal font atlas, and lays out blocks with smooth pixel scrolling.

Toggle raw mode to edit the source in a line-based editor with the same find/replace machinery as code views. Unsaved edits mark the buffer modified until you write back to disk.

## What renders today

- Headings, paragraphs, emphasis, strikethrough, inline code, links, autolinks, images (local paths resolved on load).
- Fenced code blocks with per-block Copy buttons, tables, bullet/numbered/task lists (checkboxes are clickable).
- Callouts, blockquotes, wikilinks/\[\[embeds\]\], #tags, footnote references.
- Math and diagram blocks route through md\_math.c / md\_diagram.c (coverage still expanding).

## Extended syntax and limits

The native parser also supports YAML frontmatter (including title, tags and aliases), definition lists, footnote definitions and inline footnotes, ==highlight==, ^superscript^, ~subscript~, \<details\> blocks, and a native subset of Mermaid diagrams. Raw HTML is shown as dimmed monospace text; scripts are not executed.

## Navigation aids

- ⌘ K → Go to Heading jumps via the outline collected on each render (up to 512 headings).
- ⌘ K → Open Note fuzzy-opens any markdown file under the Notes Vault.
- ⌘ K → Search Notes scans vault file contents from the palette.
- In-document Find/Replace works in rendered and raw modes (trackpad scroll accumulates pixels like the palette — ~24–40 px per tick).

## Knowledge graph

Graph View (Vault) or Graph Current Folder builds a force-directed graph of markdown files — wikilinks, tags and orphan filters are tunable from the graph settings panel. The layout worker runs asynchronously so large vaults do not freeze the UI.

[Next Command palette →](https://liu.software/docs/palette.md)
