Contribution guidelines
I've found a bug and checked that ...
Description
Code block annotations don't appear to be properly positioned on comment lines.
Expected behaviour
Properly aligned annotation mark.
Actual behaviour
The following Markdown:
# Annotation test
```shell
#!/bin/bash
#
# this is a multi-line comment
# that goes on and on # (1)
# and ends here
echo "not a comment" # (2)
echo "the end"
```
1. first annotation
2. second annotation
generates the following code block:

- Annotation (1) is made on a commented line, and the marker is inserted as a new line in the block.
- Annotation (2) is made on a regular, non-comment line, and the marker properly aligned.
Steps to reproduce
Activate code block annotations in Insiders, and generated a code block with an annotation on a language-commented line.
Package versions
- Python: Python 3.9.7
- MkDocs: mkdocs, version 1.2.3
- Material: Version: 7.3.4+insiders.3.1.4
Configuration
theme:
features:
- content.code.annotate
System information
- Operating system: Linux
- Browser: Chrome
Contribution guidelines
I've found a bug and checked that ...
mkdocsorreadthedocsthemescustom_dir,extra_javascriptandextra_cssDescription
Code block annotations don't appear to be properly positioned on comment lines.
Expected behaviour
Properly aligned annotation mark.
Actual behaviour
The following Markdown:
generates the following code block:

Steps to reproduce
Activate code block annotations in Insiders, and generated a code block with an annotation on a language-commented line.
Package versions
Configuration
System information