Render authored help as Markdown - #223
Merged
raiseCatError merged 1 commit intoSep 30, 2026
Merged
Conversation
This was referenced Sep 29, 2026
raiseCatError
added this pull request to stack #228
September 29, 2026 22:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #168.
Stacked on #222 (
feature/172-motion-engine). Merge order: #203, #217, #218, #219, #220, #221, #222, then this PR.What changed
src/help/markdown.ts: renders NMSh-authored Markdown into wrapped, styled rows. It supports headings, lists (bulleted and numbered), bold, italic, inline code, fenced code, tables and links. Tables fall back to labelled rows when too narrow. Links use OSC 8 only where supported (NMSH_HYPERLINKS=1|0overrides detection) and otherwise readtext (url). Only http(s) URLs are linked, and control characters are stripped from the source.NO_COLORgives a plain path; inline code stays visible with backticks there.src/help/helpContent.tsbuilds the/helppage from the real slash-command table plus the existing tips./helpnow renders through the new renderer with the same information as before.Safety boundary
AuthoredMarkdownvalue, created byauthoredMarkdown(). A plain string, such as shell output, does not type-check.TerminalAppcalls it exactly once, for/help. Shell output, PTY streams, transcript output,/copyand archives never pass through it.Not included
/helprenders links in the plain form. The renderer supports OSC 8 for surfaces written directly.Verification
tests/authoredMarkdown.test.ts; full suite 667/667, typecheck, build andgit diff --checkclean.