Skip to content

fix: --help describes input formats that -d, --body and --content do not implement #34

Open

Description

@cpatrickalves

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`')" --json

The 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

  1. Each help text states the accepted format and matches the code.
  2. 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:

Environment

  • planecli 0.5.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions