pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

ENH: Add support for reST-style docstrings

Open devdrian opened this issue 5 years ago • 8 comments

Hi kernc and all contributors,

Addressing issues #110 and #273, I added support for reST-style docstrings, following your suggestions in #198.

Additionally, in case the docformat is not explicitly specified, it will be distinguished between reST-style and Numpy-/Google-style in html_helpers.to_markdown.

Fixes #110 Fixes #273 Closes #198

devdrian avatar Oct 18 '20 08:10 devdrian

Thanks @kernc for your review and your suggestions!

I changed it now to utilize docutils. It's not the cleanest solution right now: Everything but the tag lists - for which Markdown is still generated - is converted directly to html using docutils' publish functions. But it definitely opens up the possibility in the future to integrate some more advanced features.

For reST I also disabled the admonitions preprocessing, since docutils processes them directly. However, some of the directives from the reST_directives test are not supported and generate a warning message. I chose to leave the messages - which are placed in a div at the corresponding position - in for now, since it allows the user to fix this. But we can discuss if that's the best way. For the reST test, I adapted the admonitions to only include ones that are directly supported by docutils.

devdrian avatar Oct 21 '20 16:10 devdrian

Hi @kernc any update on merging this PR? ;) Something is still not resolved?

collerek avatar Jan 04 '21 14:01 collerek

Any update? @kernc @collerek

Ljancek avatar Sep 16 '21 07:09 Ljancek

@kernc @collerek Why don't you merge it? :slightly_frowning_face:

makseq avatar Nov 03 '21 19:11 makseq

I'd love for :params: support to be merged, anything we can do to help test @kernc ?

kenahoo avatar Dec 20 '21 20:12 kenahoo

Hi @kernc, I would love to see this functionality within pdoc3.

Is there anyway I can help progress this? 😊

scottzach1 avatar Oct 06 '22 02:10 scottzach1

Any update on this?

Wingmore avatar Feb 16 '24 00:02 Wingmore

The pdoc code appears to have not been touched in several years. It might be time to either fork it or find an alternative.

kenahoo avatar Feb 16 '24 01:02 kenahoo