Skip to content

fix(help): fine-tune markdown generation of docopt usage text#3600

Merged
jqnatividad merged 8 commits into
masterfrom
fix-help-markdown-gen-of-bullets
Mar 10, 2026
Merged

fix(help): fine-tune markdown generation of docopt usage text#3600
jqnatividad merged 8 commits into
masterfrom
fix-help-markdown-gen-of-bullets

Conversation

@jqnatividad

Copy link
Copy Markdown
Collaborator

No description provided.

jqnatividad and others added 8 commits March 10, 2026 07:09
Treat lines beginning with "- " or "* " as list items when parsing help text instead of as section breaks. Such lines are now appended as HTML bullets ("<br>• " + content with the marker removed). Also adjust the break condition so a hyphen followed by a space ("- ") is not interpreted as a new option/section. Changes applied to parse_arguments_section and parse_option_line.
which was causing markdown formatting error
…pace in bullets

Use indentation tracking to detect when a non-bullet line in a list is
post-list text rather than a continuation of the current bullet item.
Also trim trailing whitespace from list item content before closing </li>.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Recognize the Left-to-Right mark (U+200E) as an intentional line break when generating help markdown and render it as <br> in output. Update help text for the joinp command to use HTML <br> for line breaks and fix minor punctuation/formatting in the cached schema option. This ensures docopt-inserted U+200E markers (used to avoid parsing negative numbers as flags) are displayed properly in generated docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines qsv’s help-markdown generation so docopt “Usage/Options” text renders more cleanly in the generated docs/help/*.md (notably turning bulleted blocks into HTML lists and preserving special line-break behavior).

Changes:

  • Enhance help_markdown_gen parsing to emit <ul><li>…</li></ul> for * / - bullets and treat U+200E-prefixed lines as explicit breaks.
  • Tweak a couple of command help strings (joinp, describegpt) to improve formatting/wording.
  • Regenerate/update multiple docs/help/*.md outputs to reflect the improved rendering.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/help_markdown_gen.rs Updates argument/option description parsing to better preserve lists and line breaks in generated markdown.
src/cmd/joinp.rs Minor usage-text spacing/punctuation tweaks to improve downstream markdown rendering.
src/cmd/describegpt.rs Help text wording tightened for --disk-cache-dir.
docs/help/stats.md Generated output now renders a multi-bullet description as an HTML list.
docs/help/pragmastat.md Generated docs updated (new explanatory text, examples, and options table formatting).
docs/help/joinp.md Generated docs updated to use <br>/<ul> formatting for complex option descriptions.
docs/help/geoconvert.md Generated docs updated to render valid-values block as an HTML list.
docs/help/excel.md Generated docs updated to render error-format choices as an HTML list.
docs/help/describegpt.md Generated docs updated for wording and heading capitalization (“MCP”).

Comment thread src/help_markdown_gen.rs
Comment thread src/help_markdown_gen.rs
@jqnatividad jqnatividad merged commit 8f57e87 into master Mar 10, 2026
21 checks passed
@jqnatividad jqnatividad deleted the fix-help-markdown-gen-of-bullets branch March 10, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants