Turning line numbering in docstrings -- is it possible? #7683
-
I have noticed line numbers added in the generated html document, where, ideally, they shouldn't have been. In the docstring of init.py file there is:
This piece of text is rendered -- below regular text "Source files:", there is a nice block of code, but each and every line of it is preceded with a number, e.g.
Is it possible to turn line numbering off in this, and similar, cases? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello @pykhaz,
However, the first bullet point is not explicitly stated, so I checked the source code out: linenums_enabled = (
(self.linenums and linestart != 0) or
(self.linenums is not False and linestart > 0)
) and not inline > 0 So I think you should be able to disable the linenums per code block with the
|
Beta Was this translation helpful? Give feedback.
-
@kamilkrzyskow has beaten me to it but the option should be
|
Beta Was this translation helpful? Give feedback.
Hello @pykhaz,
based on the
linenums
option description I read it as either:🤔
However, the first bullet point is not explicitly stated, so I checked the source code out: