Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown bullet lists in docstrings don't render correctly #449

Open
7 tasks done
taranlu-houzz opened this issue Sep 1, 2022 · 1 comment
Open
7 tasks done

Markdown bullet lists in docstrings don't render correctly #449

taranlu-houzz opened this issue Sep 1, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@taranlu-houzz
Copy link

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Typer documentation, with the integrated search.
  • I already searched in Google "How to X in Typer" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to Typer but to Click.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

import typer

app = typer.Typer(rich_markup_mode="markdown")


@app.command()
def bullet_list(item: str):
    """bullet list

    - 1
    - 2
    - 3
    """

    print(f"Deleting item: {item}")


@app.command()
def nested_bullet_list(item: str):
    """nested bullet list

    - 1
    - 2
      - a
      - b
    - 3
    """

    print(f"Creating item: {item}")


if __name__ == "__main__":
    app()

Description

Bullet lists are rendered incorrectly when rich_markup_mode is set to "markdown". Instead of rendering a list, all list items appear on the same line. This does not happen when the mode is set to "rich".

Operating System

macOS

Operating System Details

No response

Typer Version

0.6.1

Python Version

Python 3.7.12

Additional Context

No response

@taranlu-houzz taranlu-houzz added the question Question or problem label Sep 1, 2022
@tancnle
Copy link

tancnle commented Oct 12, 2023

Relate to #447 of and addressed by #671.

@svlandeg svlandeg added bug Something isn't working and removed question Question or problem labels Jun 10, 2024
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

No branches or pull requests

3 participants