Skip to content

fix: render Click \b verbatim blocks in CLI reference docs (#866)#867

Open
planetf1 wants to merge 4 commits intogenerative-computing:mainfrom
planetf1:cs/issue-dosc
Open

fix: render Click \b verbatim blocks in CLI reference docs (#866)#867
planetf1 wants to merge 4 commits intogenerative-computing:mainfrom
planetf1:cs/issue-dosc

Conversation

@planetf1
Copy link
Copy Markdown
Contributor

@planetf1 planetf1 commented Apr 15, 2026

fix: render Click \b verbatim blocks in CLI reference docs

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

The CLI reference docs generator was silently dropping \b-delimited
sections from m fix async and m fix genslots. These blocks —
Modes, Best practices, Detection notes, Rewrites — are visible in
--help but were buried after Raises: in the docstrings, which the
section parser assigns to sections["Raises"], a section that is never
rendered.

Fix adds _extract_verbatim_blocks() which splits the raw help text on
\x08 directly, independent of the section parser. Blocks are rendered
after the options table with format chosen to match their content:

  • Bullet lists (Best practices, Detection notes, Rewrites) — rendered
    as markdown bullets, with wrapped continuation lines rejoined.
  • Two-column aligned blocks (Modes) — rendered as bold-name bullets
    (- **\name`** — description`) to preserve the name/description
    structure at consistent font size.

PDF -> CLI Reference - Mellea.pdf

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

…e-computing#866)

The docs generator was silently dropping \b-delimited sections
(Modes, Best practices, Detection notes, Rewrites) from m fix async
and m fix genslots. These blocks were buried inside the Raises section
by the docstring parser and never rendered, causing a fidelity gap
with --help output.

Adds _extract_verbatim_blocks() to split on \x08 directly from the
raw help text, independent of the section parser. Three new tests
verify the extraction logic and that the affected content now appears
in the generated reference page.
@github-actions github-actions bot added the bug Something isn't working label Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Best practices, Detection notes and Rewrites sections in \b blocks
are bullet lists and should render as markdown, not monospace code.
Modes retains a code fence as it uses columnar alignment.

Continuation lines wrapped across multiple source lines are joined
back into their parent bullet.
Click-style two-column aligned blocks (e.g. Modes in m fix async) were
rendered as code fences. The generator now detects the name + 2-space +
description pattern and emits a markdown table, preserving the original
terminal-aligned docstring format while rendering cleanly in HTML docs.
Table cells render in a smaller font than body text in Mintlify,
creating inconsistency with bullet-list blocks. Render two-column
\b blocks as `- **\`name\`** — description` bullets instead:
consistent font, no invented column headers.
@planetf1 planetf1 requested a review from serjikibm April 15, 2026 16:26
@planetf1 planetf1 marked this pull request as ready for review April 15, 2026 16:26
@planetf1 planetf1 requested a review from a team as a code owner April 15, 2026 16:26
@planetf1
Copy link
Copy Markdown
Contributor Author

AFTER merge this will be available at https://ibm-llm-runtime-aaf3a78b.mintlify.app/ for verification. It will get to https://mellea.ai when the next release is made.

@planetf1 planetf1 enabled auto-merge April 16, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI reference docs are missing content visible in --help

1 participant