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

line breaks on multi line docstring #368

Closed
talnagar opened this issue Mar 30, 2022 · 2 comments
Closed

line breaks on multi line docstring #368

talnagar opened this issue Mar 30, 2022 · 2 comments
Labels

Comments

@talnagar
Copy link

Problem Description

I have a docstring for method params, when I run pdoc they all appear as a one line sentence.
Is there a way to control this?

Steps to reproduce the behavior:

doc sctring is:

def send_email(subject: str, email: str, content: str, files: List[str] = []) -> None:
"""
    send an email
    :param subject: email subject line
    :param email: email address of recipient
    :param content: content of the email
    :param files: list of file paths to be attached to email
"""

after generating pdoc html this is the result:
image

System Information

==0.10.0

@talnagar talnagar added the bug label Mar 30, 2022
@mhils
Copy link
Member

mhils commented Mar 30, 2022

I think the main problem is that we don't properly support :param yet (#275). pdoc treats the docstring as plain Markdown where line breaks are only considered if the previous line ends with two or more spaces. So the three workarounds are (1) adding spaces, (2) adding empty lines, or (3) using a different documentation format. That being said, I've had a few folks ask about :param support, so maybe this is just something we should start tackling. 😃

@talnagar
Copy link
Author

thanks @mhils adding spaces at the end of the line is a good hack 😃
I'll keep tracking to see if you add support for the :param feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants