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

Code annotations with extra comments have a wrong ID #2444

Closed
JulioV opened this issue Mar 14, 2021 · 4 comments
Closed

Code annotations with extra comments have a wrong ID #2444

JulioV opened this issue Mar 14, 2021 · 4 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@JulioV
Copy link

JulioV commented Mar 14, 2021

I've found a bug and checked that ...

  • [x ] ... the problem doesn't occur with the default MkDocs template
  • [ x] ... the problem is not in any of my customizations (CSS, JS, template)
  • [ x] ... the documentation does not mention anything about my problem
  • [ x] ... there are no open or closed issues that are related to my problem

Description

Comments that are not annotations are counted as one, so the next annotation ID is wrong.

For example, for:

PHONE_ACCELEROMETER: # (1)
ANOTHER: 1 # not an annotation
CONTAINER: accelerometer # (2)

Expected behavior

PHONE_ACCELEROMETER: (1)
ANOTHER: 1 # not an annotation
CONTAINER: accelerometer (2)

Actual behavior

PHONE_ACCELEROMETER: (1)
ANOTHER: 1 # not an annotation
CONTAINER: accelerometer (3)

Steps to reproduce the bug

  1. ...
  2. ...
  3. ...

Package versions

  • Python: python --version 3.7.9
  • MkDocs: mkdocs --version 1.1.2
  • Material: pip show mkdocs-material | grep -E ^Version Version: 7.0.6+insiders.2.3.1

Project configuration

The contents of your mkdocs.yml

System information

  • OS: Mac
  • Browser: Firefox
@JulioV JulioV changed the title Code annotations with extra comments Code annotations with extra comments have a wrong ID Mar 14, 2021
@squidfunk
Copy link
Owner

Thanks for reporting! Confirmed!

@squidfunk squidfunk added the bug Issue reports a bug label Mar 14, 2021
@squidfunk
Copy link
Owner

... and fixed in the latest commit on the Insiders repository:

Bildschirmfoto 2021-03-14 um 19 45 14

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Mar 14, 2021
@JulioV
Copy link
Author

JulioV commented Mar 14, 2021

Awesome, thanks!

@squidfunk
Copy link
Owner

squidfunk commented Mar 20, 2021

The bugfixes were just released as part of Insiders 2.4.0, which also adds support for custom admonition icons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants