### Bug description

Code annotation numbers (in the little circle) appear one line above where they should in the output, in Safari.

### Steps to reproduce

The following code, with a comment meant to be on the second line of the r code results in the output below in Safari, where the (1) appears on the first line instead.

````qmd
---
title: "Test"
format: html
---

```{r}
2 + 1
1 + 1  #<1>
```

1.  Test comment
````

<img width="755" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/2888701/3b581c51-0c86-4d88-9f97-df7143be5eed">

### Expected behavior

In Chrome and Firefox the output is correct, with the above code producing the following output, with the (1) appears correctly on the second line:

<img width="636" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/2888701/716843e5-bfd4-4678-a995-5e09c6580bba">


### Actual behavior

The code above results in the following in Safari, where the (1) is on the first line of the R code instead of the second (as above).

<img width="755" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/2888701/3b581c51-0c86-4d88-9f97-df7143be5eed">

### Your environment

IDE: Rstudio 2023.06.0+421
OS: macOS Ventura 13.4.1
Safari: Version 16.5.1 (18615.2.9.11.7)

### Quarto check output

```bash
quarto check

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.361
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.6
      Path: /Library/Developer/CommandLineTools/usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

(\) Checking R installation...........Warning message:
"~/.Rprofile" is missing a trailing newline 
[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/abraver/Library/CloudStorage/Dropbox/R stuff/bloop/renv/library/R-4.3/aarch64-apple-darwin20
        - /Users/abraver/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.3/aarch64-apple-darwin20/84ba8b13
      knitr: 1.43
      rmarkdown: 2.22

[✓] Checking Knitr engine render......OK
```
dragonstyle
2023-06-23T17:34:05Z
abraver
bug
v1.4
open
Code annotation number on wrong line in Safari
https://github.com/quarto-dev/quarto-cli/issues/6016