Skip to content

Added '--markup' option. #180

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

Closed

Conversation

doloopwhile
Copy link

@doloopwhile doloopwhile commented Nov 7, 2018

Hello.

We are using pdoc for our internal packages. That's very convenient!

However, Some my coworkers are unwilling for pdoc because pdoc assumes all docstrings are written in Markdown and formats their plain-text docstrings wrongly.

Therefore I added --style option:

  • --style=markdown: to interpret as Markdown (current and default behavior).
  • --style=pre: just to wrap docstring with <pre>.

I bet that --style is going to boost the users of pdoc.

I think Google's style and Numpy's style are also expected by not a few people. I will add this two styles if this pull-request is accepted. (However, Currently, I do not have enough time.)

Thanks.

@mhils
Copy link
Member

mhils commented Nov 7, 2018

Thanks for the PR! refs #153

@doloopwhile
Copy link
Author

thanks.
I am going to fork.

@@ -99,7 +100,22 @@
default=8080,
help="The port on which to run the HTTP server.",
)
aa(
"--style",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer --docstring-style. Less ambiguous.

<table id="module-list">
% for root in roots:
<tr>
<td><a href="${link_prefix}${root.name}">${root.name}</a></td>
<td>
% if len(root.docstring.strip()) > 0:
<div class="desc">${root.docstring | hh.mark}</div>
<div class="desc}">${root.docstring | hh.mark(markup)}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

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

Successfully merging this pull request may close these issues.

3 participants