fix(help): fine-tune markdown generation of docopt usage text#3600
Merged
Conversation
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
…n GH markdown inside tables
…endering issues also capitalize MCP
…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.
Contributor
There was a problem hiding this comment.
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_genparsing 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/*.mdoutputs 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”). |
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.
No description provided.