### Bug description

I was writing a blog post (<https://github.com/mcanouil/mickael.canouil.fr/pull/86>) when I realised at rendering time that you can't use code annotation in list (numbered and unnumbered) which is a bit unexpected and a bit annoying I must say 😅.

Below a smaller version exhibiting the issue.
<details><summary>See Quarto document.</summary>

````qmd
---
format: html
code-annotations: hover
---

1. Step 1
   
   ```bash
   ARG QUARTO_VERSION="1.3.340"
   
   FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder             # <1>
   
   ARG RIG_VERSION="latest"
   ARG R_VERSION="release"
   COPY install-rig.sh /tmp/install-rig.sh
   RUN bash /tmp/install-rig.sh "${RIG_VERSION}"                           # <2>
   RUN rig add ${R_VERSION} && Rscript -e 'pak::pkg_install("renv")'       # <3>
   
   COPY mywebsite /app                                                     # <4>
   WORKDIR /app
   RUN Rscript -e "renv::restore()"
   RUN quarto render .                                                     # <5>
   
   FROM httpd:alpine                                                       # <6>
   COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/              # <7>
   ```
   1. The base Docker image use to be the builder, here it is the Quarto image which is Ubuntu based image with Quarto pre-installed.  
     The `builder` stage is used to install the `rig` and the specified R version, and to render the website.
   2. The `install-rig.sh` script is used to install the `rig` software.
   3. Using `rig`, we add the specified R version and install the `renv` package.
   4. We copy the Quarto project into the `/app` directory of the builder.
   5. We restore the `renv` environment and render the website.
   6. The second and last stage is the `httpd:alpine` image which is a light image with Apache pre-installed.  
   7. We copy the rendered website from the `builder` to the `/usr/local/apache2/htdocs/` directory of the second stage.
   
2. Step 2

   ```bash
   docker buildx build \
     --platform "linux/amd64" \                                            # <1>
     --build-arg QUARTO_VERSION=1.3.340 \                                  # <2>
     --tag "mywebsite:1.0.0" \                                             # <3>
     .
   ```
   1. We specify the platform to build the image for.
   2. We specify the Quarto version to use during the build.
   3.  We tag the image with the name `mywebsite` and the version `1.0.0`.
     This is useful to be able to identify the image later.

3. Step 3

   ```bash
   docker container run \
     --detach \                                                            # <1>
     --platform "linux/amd64" \                                            # <2>
     --name mywebsite \                                                    # <3>
     --publish 8080:80 \                                                   # <4>
     mywebsite:1.0.0                                                       # <5>
   ```
   1.  We run the container in detached mode.
   2.  We specify the platform to define the architecture of the container, thus the image to use.
   3.  We name the container `mywebsite`, to ease identification.
   4.  We publish the port `8080` of the host to the port `80` of the container.
     This is useful to be able to access the website from the host.
   5.  We specify the image to use.
````

</details>
<img width="608" alt="image" src="https://user-images.githubusercontent.com/8896044/235496953-699b2218-bc64-46f7-9369-0c66475e5acc.png">

---

Rendered via Quarto CLI in terminal on MacOS Apple Silicon using the latest dev version of Quarto.

```bash

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      Path: /Users/mcanouil/Projects/quarto/quarto-cli/package/dist/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.3
      Path: /Users/mcanouil/Projects/misc/quarto-playground/env/bin/python
      Jupyter: 5.3.0
      Kernels: python3

(\) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK

(\) Checking R installation...........ℹ R version 4.3.0 (2023-04-21)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
      Version: 4.3.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/mcanouil/Projects/misc/quarto-playground/renv/library/R-4.3/aarch64-apple-darwin20
        - /Users/mcanouil/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.3/aarch64-apple-darwin20/84ba8b13
      knitr: 1.42
      rmarkdown: 2.21

[✓] Checking Knitr engine render......OK

```

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
dragonstyle
2023-05-01T17:31:00Z
mcanouil
bug
closed
`code-annotations` do not play well (or not at all) in lists
https://github.com/quarto-dev/quarto-cli/issues/5375