pdoc
pdoc copied to clipboard
reStrucutured text :param: :return: support
Dear @kernc, maintainers,
For issue #110 I have implemented quite a dirty hack that adds the reSt :param x: and :return: directives replacing them with the Google-style docstring.
This does not break any of the tests, but I have not implemented a specific test for it, while it works in my case.
Fixes #110
Doesn't seem cumbersome a transliteration, given its brevity so far. However, I'd much prefer it with the following points addressed:
- [ ] the whole transliteration a separate procedure in e.g.
_ToMarkdown.sphinx_params(), - [ ] the procedure returning valid, complete markdown, not Google
Args:(permitted to call through_ToMarkdown.google()if needed), - [ ] the implementation based on
re.sub()instead ofstr.replace()~~(or maybe even docutils :scream:)~~, - [ ] accounting for other Sphinx keywords (
param,type,raises,return,rtype), - [ ] added a unit test.