quarto-dev / quarto-dev/quarto-cli
code wrap incorrectly with line number
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
IDE: VScode with Quarto 1.2.269
OS: Windows 11
Description:
Suppose I create a default web project.
Then I open the code wrap and line number in configs as below:
format:
html:
code-line-numbers: true
code-overflow: wrap
Then if I have a code block with a very long line, it will look bad, as shown below in the first code block:

I have to close the code line number to make the wrapping code overflow works, as the second code block. The problem exists in different themes and fonts too.
Checklist
- 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.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
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.
Research direction
Start with the minimal .qmd example using the shown HTML format settings, then render it to reproduce the interaction between code-line-numbers and code-overflow: wrap. Inspect the generated HTML and styling around the code block. Done means long lines wrap correctly while line numbers remain enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html, javascript, yaml
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100