Inconsistent line numbering in OJS code chunks
@cscheid is already working on this.
Since Mar 27, 2025.
Assessment
This issue has not been assessed yet.
Description
Bug description
When using OJS code chunks in a Quarto presentation, the line numbering behaves inconsistently depending on the eval parameter.
Steps to reproduce
---
format: revealjs
execute:
echo: true
---
No line numbering.
```{ojs}
x = 1
```
Line numbering but according to position in `.qmd`.
```{ojs}
//| eval: false
y = 1
```
Normal line numbering with `R` chunck.
```{r}
z <- 1
```
Actual behavior
- If
eval: true, no line numbers are shown in the OJS chunk (whereas I expected them to appear by default, isn't it?). - If
eval: false, line numbers appear, but they reflect the line numbers of the entire .qmd file rather than starting at the OJS chunk lines.
Expected behavior
OJS chunks should always display line numbers that start at 1, regardless of the eval parameter—just like other code chunks in Quarto typically do.
Your environment
RStudio: Version 2024.12.1+563
OS: MacOS Sequoia 15.3.2
Quarto: 1.6.40 and 1.6.42
Quarto check output
Quarto 1.6.42
[✓] Checking environment information...
Quarto cache location: /Users/antoinebichat/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.42
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/antoinebichat/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Users/antoinebichat/.virtualenvs/r-reticulate/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.4.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.49
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy-website#2595 ·