squidfunk / mkdocs-material

Documentation that simply works

Home Page:https://squidfunk.github.io/mkdocs-material/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotation: More than one annotation in a single line

DimanNe opened this issue · comments

Contribution guidelines

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

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

It seems it is impossible to get rid of the hash sign below, even though it seems it should be possible with # (n)! syntax:
image

Source code:

    ```bash
    #             (1)(2) (3)        (4)         (5)         (6)                  (7)
    ykpersonalize -v -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible -ochal-btn-trig
    ```
    1. Verbose output
    2. Use slot 2
    3. Set Challenge-Response mode
    4. Generate HMAC-SHA1 challenge responses
    5. Calculate HMAC on less than 64 bytes input
    6. Allow YubiKey serial number to be read using an API call
    7. Require touching YubiKey before issue response

adding ! after (1) or (7) breaks everything.

Expected behaviour

No # at the start of line with code like

#             (1)!(2)! (3)!        (4)!         (5)!         (6)!                  (7)!
ykpersonalize -v -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible -ochal-btn-trig

or like this:

#             (1)(2) (3)        (4)         (5)         (6)                  (7)!
ykpersonalize -v -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible -ochal-btn-trig

Actual behaviour

Depending on the code:

  1. There is # sign at the start of the line
  2. If I try to put ! at the end, there is no annotations.

Steps to reproduce

See code example above.

Package versions

  • Python: python --version: Python 3.9.5
  • MkDocs: mkdocs --version: mkdocs, version 1.3.0 from /usr/local/lib/python3.9/dist-packages/mkdocs (Python 3.9)
  • Material: pip show mkdocs-material | grep -E ^Version: Version: 8.2.8+insiders.4.12.0

Configuration

site_name: Internal Docs


theme:
  name: material
  custom_dir: overrides
  features:
    - navigation.tracking
    - navigation.tabs
    - navigation.expand
    - navigation.top
    - content.tabs.link
    - content.code.annotate
  icon:
    admonition:
      # note: octicons/tag-16
      # abstract: octicons/checklist-16
      # info: octicons/info-16
      # tip: octicons/squirrel-16
      # success: octicons/check-16
      # question: octicons/question-16
      # warning: octicons/alert-16
      failure: octicons/x-circle-16
      # danger: octicons/zap-16
      bug: octicons/bug-16
      # example: octicons/beaker-16
      # quote: octicons/quote-16


markdown_extensions:
    - toc:
        permalink: True
    - smarty
    - sane_lists
    - abbr
    - pymdownx.snippets
    - admonition
    - pymdownx.details
    - attr_list
    - md_in_html
    - pymdownx.superfences
    - pymdownx.tabbed:
        alternate_style: true
    - pymdownx.highlight:
        anchor_linenums: true
    - pymdownx.inlinehilite
    - pymdownx.critic
    - pymdownx.caret
    - pymdownx.keys
    - pymdownx.mark
    - pymdownx.tilde
    - tables
    - pymdownx.emoji:
        emoji_index: !!python/name:materialx.emoji.twemoji
        emoji_generator: !!python/name:materialx.emoji.to_svg
    - def_list
    - pymdownx.tasklist:
        custom_checkbox: true
    - pymdownx.arithmatex:
        generic: true


extra_css:
  - stylesheets/extra.css


extra_javascript:
  - javascripts/mathjax.js
  - https://polyfill.io/v3/polyfill.min.js?features=es6
  - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js


plugins:
  - offline

System information

  • Operating system: docker image with based on ubuntu:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute
  • Browser: Google Chrome | 101.0.4951.41 (Official Build) beta (64-bit)

Thanks for reporting! This is a known technical limitation, as noted in the documentation:

Note that this only allows for a single code annotation to be rendered per comment. If you want to add multiple code annotations, comments cannot be stripped for technical reasons.

Comment signs can only be stripped for single-annotation comments.

Sorry, my bad.