-
Notifications
You must be signed in to change notification settings - Fork 51
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
Question: Ignore code linebreaks in html output #673
Comments
Hi @buhtz, Pydoctor doesn’t have support for token information at this time. See #294. it reads the docstring (and other values) as given by the ast. So having special logic for the backslash character is not currently possible, because the ast does not contains this information. It’s not gorgeous but you can probably do that: class Foo:
def _table_of_something(self, the_type: _ControlType):
"""Generic method to create a referene list (e.g. TOC).
It is used for `table_of_contents()`.
Credits ::
The code is based on the following sources
- ttps://stackoverflow.com/a/59170642/4865723
- https://github.com/python-openxml/python-docx/issues/36
- https://github.com/xiaominzhaoparadigm\
/python-docx-add-list-of-tables-figures/blob/master/LOT.py
"""
pass Tell me if it works as expected, |
Thanks. This does work. Even |
I just want to add another solution/workaround.
The |
I keep my code lines (including docstrings) less then 80 chars according to PEP8.
That makes problems in doc strings, e.g. when having long URLs in their.
See this real world example
You see the 3rd url in the doc string? I added a newline via
\
(backslash). PyDoctor doesn't handle that. The output looks like this.Is there a way to work around this without violating PEP8 or adding exceptional rules about line length to my code linter?
The text was updated successfully, but these errors were encountered: