Open rpruim opened 2 days ago
code-line-numbers
does not allow you to set fragment index, it creates an index for each line you set, so it is not expected for the code to have anything but a sequence of four elements in your case.
For instance, since you set manually index 1 and 2, it means first line will be index 3 and the second line will be index 4.
So, this would be a feature request to allow to manually set fragment index in addition to setting the lines.
````qmd --- title: "code-line-numbers" format: revealjs code-annotations: below execute: echo: true --- ## A slide ```{r} #| code-line-numbers: "1" x <- 1 # <1> ``` 1. Comment on first line of code ## A slide ```{r} #| code-line-numbers: "2" x <- 1 # <1> y <- 2 # <2> ``` 1. [Comment on first line of code]{style="opacity: 0.25;"} 2. Comment on second line of code ````
Bug description
I would like to use `#| code-line-numbers and custom fragments to annotate revealjs slides, but I haven't been able to get it to work. Is this possible?
Here is the kind of thing I have in mind.
:::{.fragment fragment-index=1} Comment on first line of code :::
:::{.fragment fragment-index=2} Comment on second line of code :::