Skip to content
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

bug: Enabling pymdownx line numbers globally also renders them in signatures #192

Closed
pawamoy opened this issue Oct 14, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@pawamoy
Copy link
Member

pawamoy commented Oct 14, 2024

Line numbers appear for signatures. They shouldn't (it doesn't make sense). Reported on the Matrix channel.

@pawamoy pawamoy added the bug Something isn't working label Oct 14, 2024
@pawamoy pawamoy self-assigned this Oct 14, 2024
@pawamoy
Copy link
Member Author

pawamoy commented Nov 26, 2024

OK, easy fix. I also decided to do the opposite for pycon code examples in docstrings (the ones written without fences) and to start respecting highlight's configuration. Commit message:

The reasoning is that someone enabling line numbers globally supposedly also wants them for code blocks in docstrings. There's in my opinion no difference between a code block in a Markdown document and a code block in a docstring, they both serve documentation purposes and should be subject to the same rendering rules.

If that makes someone unhappy, we can always consider adding an option to hide line numbers for code blocks in docstrings.

pawamoy added a commit that referenced this issue Nov 26, 2024
…cstrings

The reasoning is that someone enabling line numbers globally supposedly also wants them for code blocks in docstrings. There's in my opinion no difference between a code block in a Markdown document and a code block in a docstring, they both serve documentation purposes and should be subject to the same rendering rules.

If that makes someone unhappy, we can always consider adding an option to hide line numbers for code blocks in docstrings.

Related-to-#192: #192
@pawamoy pawamoy closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant