Skip to content

Turning line numbering in docstrings -- is it possible? #7683

Answered by kamilkrzyskow
pykhaz asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @pykhaz,
based on the linenums option description I read it as either:

Enable line numbers globally for block code. This will be ignored for inline code. If set to False line numbers will be disabled globally and can not be turned on, not even per code block.

  • enabled globally, without the option to turn it off for specific code blocks
  • "not set" globally, with the option to turn it on for specific code blocks
  • disabled globally, without the option to turn it on for specific code blocks
    🤔

However, the first bullet point is not explicitly stated, so I checked the source code out:

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@pykhaz
Comment options

Answer selected by pykhaz
Comment options

alexvoss
Nov 9, 2024
Collaborator Sponsor

You must be logged in to vote
2 replies
@kamilkrzyskow
Comment options

@alexvoss
Comment options

alexvoss Nov 9, 2024
Collaborator Sponsor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants