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

move main docstring into a file #57

Merged
merged 5 commits into from May 1, 2019

Conversation

2 participants
@cs01
Copy link
Contributor

commented May 1, 2019

This makes the code easier to read since it's not underneath a large docstring. It also makes the documentation easier to edit since text editors can add syntax highlighting to the raw markdown content, and do realtime markdown previews.

@kernc

kernc approved these changes May 1, 2019

Show resolved Hide resolved pdoc/__init__.py Outdated
Show resolved Hide resolved pdoc/documentation.md Outdated
@cs01

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

I want to run the markdown autoformatter on this file to make it more consistent, but I can't tell what format its contents are. Is it markdown? Markdown with some pdoc syntax mixed in? Rst?

Show resolved Hide resolved pdoc/documentation.md Outdated

cs01 and others added some commits May 1, 2019

Revert "remove typo"
This reverts commit 5d2ced5.

Leave formatting for now.
@kernc

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

I'm sorry for not having been more verbose up front. Let's just do the moving in this PR (which will become a commit) and the TBD reflowing in a subsequent PR. I'm sure you can see the advantage of this (large, strictly moving remaining a stand-alone commit).

@kernc kernc merged commit eda27f3 into pdoc3:master May 1, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kernc

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

make it more consistent

What do you mean? 😕

It's actually simple Markdown Extra. Really just what is supported by Python Markdown with enabled plugins.

extensions=[
"markdown.extensions.abbr",
"markdown.extensions.attr_list",
"markdown.extensions.def_list",
"markdown.extensions.fenced_code",
"markdown.extensions.footnotes",
"markdown.extensions.tables",
"markdown.extensions.admonition",
"markdown.extensions.smarty",
"markdown.extensions.toc",
],

@kernc

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

It's actually simple Markdown Extra.

And some reST directives, which are in the pipeline transformed into markdown admonitions.

@kernc

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

Btw, thanks for this! Indeed, both files are much more manageable now! 😄 🚀

kernc added a commit that referenced this pull request May 1, 2019

REF: Remove redundant escape backslashes from documentation.md
No longer required since the content is no longer
a Python string.

Refs:
* eda27f3
* #57
@cs01

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

Ah sorry about that "revert typo" commit. What happened there was I am using VS Code and they have an auto-formatter for markdown files which I forgot I ran.

I was asking earlier about the language of the docstring, because when I ran the VS Code autoformatter it was stripping away what looked like useful information. I see now that is because pdoc is using various syntax that the autoformatter doesn't recognize.

make it more consistent

What do you mean?

Consistent heading syntax, for example. i.e. ## next to title vs ------ underneath the title. Also various capitalization, etc. See the changes in this diff.

 Where does `pdoc` get documentation from?	
-----------------------------------------

is transformed to

## Where does `pdoc` get documentation from?
@kernc

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

This PR introduced a bug with sidebar TOC no longer rendering when the docstring was included from another file. @cs01 Looking at your website actually made me aware of it. 😄 It's been fixed in 54fc6d0, and the whole lot released moments ago as v0.6.0. Thanks again!

@cs01

This comment has been minimized.

Copy link
Contributor Author

commented May 3, 2019

Nice, thanks for the release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.