Expand description
doc_render submodule.
Render raw hover-doc markdown (from lsp::doc_text_for) into a terminal
display string. Same visual surface as the stryke docs interactive
browser — bold topic heading, dim rule, cyan inline backticks, green
code fences — but without the pager chrome (header/footer banner,
page navigation hints), so a single doc page can be returned by the
docs(TOPIC) builtin and printed inline at the REPL.
Colors are conditional: callers pass colored=true only when stdout is
a TTY so piped / file-redirected output stays clean.
Functions§
- render_
doc - Render a doc page (heading + rule + body) for terminal display.
textis the raw markdown returned bylsp::doc_text_for. Whencoloredis false, ANSI sequences are stripped to empty strings so the output is plain UTF-8 suitable for files / pipes / non-tty sinks.