fix(docs): reformat Prompt and Theme section and fix MDX code-block bug
Verified every claim in the Prompt and Theme section against the actual source and corrected several inaccuracies: the Starship wrapper's missing C3 gate, the fallback prompt's vi-mode states and segment order, the FZF theme's real location (conf.d/theme.fish, not integrations/fzf.fish) and color set, and the Catppuccin theme-switch example using the wrong fish_config subcommand (choose, not save). The right-prompt Docker-context example was rewritten to show that it's independent of exit status. While reformatting, found that any block build-manual.py couldn't classify as shell/table/tree fell back to plain 4-space markdown indentation, which silently renders as squashed, unreadable paragraph text on any page that also contains an <Aside> or <FileTree> — MDX has no indented-code-block syntax, unlike plain Markdown. This affected 07-customization.mdx plus four other pages. Fixed the fallback to emit a fenced ```text block instead, since fences work in both MDX and plain Markdown; this also gives every affected block Starlight's normal code-block styling instead of a bare grey slab. docs/fish-config.md is intentionally left stale here — CI regenerates and auto-commits it from docs/manual/** on push to main.
This commit is contained in:
@@ -189,7 +189,7 @@ SHELL_HEADS = frozenset(
|
||||
if jobs kitty ls man math mkdir mv nvim npm pacman paru pip pip3 pkg printf
|
||||
python python3 rm set shutdown source string sudo switch systemctl test time
|
||||
tmux touch trash type wget wezterm while yay zellij zypper
|
||||
fish_default_key_bindings fish_vi_key_bindings
|
||||
fish_default_key_bindings fish_vi_key_bindings fish_config
|
||||
""".split()
|
||||
)
|
||||
|
||||
@@ -394,7 +394,13 @@ def _render_para(para: list[str], entry_name: str | None, deeper: bool) -> str:
|
||||
table = _as_ruled_table(para) or _as_table(para) or _as_file_tree(para)
|
||||
if table is not None:
|
||||
return table
|
||||
return "\n".join(INDENT + line for line in para)
|
||||
# MDX (used for any page that also carries an <Aside> or <FileTree>)
|
||||
# has no indented-code-block syntax — a plain 4-space-indented block
|
||||
# silently renders as flowed paragraph text there, collapsing every
|
||||
# line break. A fenced block works in both MDX and plain Markdown, so
|
||||
# it's the only fallback that's safe regardless of which one a given
|
||||
# page ends up promoted to.
|
||||
return "```text\n" + "\n".join(para) + "\n```"
|
||||
|
||||
|
||||
def _prettify_block(block: list[str], entry_name: str | None) -> str:
|
||||
|
||||
Reference in New Issue
Block a user