Repository navigation
Description
Describe the bug
The help text of several commands describes an input format that the code does not implement. Agents and users follow --help, send plain text or markdown, and get a broken description with no error.
| Command | Help text says | Code does |
|---|---|---|
wi create -d, wi update -d |
"plain text" | Stores <p>{description}</p> as HTML, without conversion |
comment create --body, comment update --body |
"plain text, converted to HTML" | Stores <p>{body}</p>, without conversion |
doc create --content, doc update --content |
"plain text / markdown, converted to HTML" | Fixed in #21/#22: converts through planecli.utils.body_html.body_to_html. HTML input is still wrapped in <p> (see #32) |
To reproduce
planecli wi create "Title" -p PROJECT -d "$(printf '## Heading\n\nText with `code`')" --jsonThe stored description_html is one paragraph with a literal ## and literal backticks. The command reports success, so the problem only shows up when someone opens the item.
Expected behavior
- Each help text states the accepted format and matches the code.
- These three inputs accept markdown and convert it to HTML, through one shared function. Values that already start with an HTML tag are stored as they are.
If converting markdown is out of scope, item 1 still applies: the help text should say that the value is stored as raw HTML.
Related
This issue covers the help text and markdown input. The shared function now exists (planecli.utils.body_html.body_to_html, used by doc create/update), so the remaining work is to route the other two inputs through it. One PR can close this issue together with:
- fix: wi create/update -d wraps HTML in <p>, nesting block elements #32:
wi create/update -dnests block HTML inside<p>, loses newlines in plain text, andwi update -inests the server's<div>wrapper on each append - fix(comments): convert comment bodies with body_to_html and stop nesting links #40: comments do not use
body_to_html, andbody_to_htmlnests<a>inside an existing link. fix(comments): convert comment bodies with body_to_html and stop nesting links #40 covers the comment symptoms:- fix: comment body newlines are lost (stored as raw HTML without <br>/<p>) #17: comment newlines are lost
- fix: bare URLs in comment bodies are not linkified #18: bare URLs in comments are not linkified
- fix: backtick code spans in comment bodies render literally #19: backticks in comments render literally
- fix: doc create crashes, --content loses formatting, doc delete silently no-ops #21 (closed):
doc --contentlost formatting; fixed bybody_to_html
Environment
- planecli 0.5.1
Activity