Skip to content

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

Closed

Description

@pawamoy

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

Activity

  1. self-assigned this
    on Oct 14, 2024
  2. pawamoy commented on Nov 26, 2024

    @pawamoy
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions