squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.53k stars 3.5k forks source link

Two Identical Annotations do not work #7463

Closed ibrahimaljalal closed 1 month ago

ibrahimaljalal commented 1 month ago

Context

No response

Bug description

In the code below:

annotation 1 (1) second annotation 2 (2) first annotation 3 (same as one) (1)
{ .annotate }

1. text in first annotation
2. text in second annotation

The annotation after "annotation 1" will not open. If we remove one of the annotations with number one "(1)". The issue will go.

Related links

Reproduction

annotation issue.zip

Steps to reproduce

  1. install the mkdocs and material theme

  2. in terminal write: python -m mkdocs new .

  3. Write in the mkdocs.yml file: markdown_extensions:

    • attr_list
    • md_in_html
    • pymdownx.superfences
  4. Write in the docs/index.md file: annotation 1 (1) second annotation 2 (2) first annotation 3 (same as one) (1) { .annotate }

  5. text in first annotation

  6. text in second annotation

Browser

No response

Before submitting

squidfunk commented 1 month ago

Thanks for reporting. This is a known limitation. You need to copy the list item and uniquely reference annotations. It's not easy to fix, because annotations can contain anything, including interactive elements that we can't just clone, which we'd need to do if we'd support it. We may re-evaluate this in the future, but for now it is not supported.