-
Notifications
You must be signed in to change notification settings - Fork 416
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
Fenced inline code does not render properly when at the start of a line.
Steps to reproduce
---
title: "Issue with fenced inline code at beginning of line"
date: last-modified
---
For teaching materials explaining how to use insert inline code, I would like to display source code demonstrating how to use inline code in the rendered version of a Quarto document. Here's an example below:
``` markdown
## Inline code demo
`{{r}} nrow(penguins)` penguins are included in the amazing `penguins` dataset.
On average these penguins weigh `{{r}} mean(penguins$body_mass, na.rm = TRUE)` grams, although the lightest weighs `{{r}} min(penguins$body_mass, na.rm = TRUE)` g and the heaviest `{{r}} max(penguins$body_mass, na.rm = TRUE)` g.
```
When the paragraph above is rendered, the inline code snippets are all correctly rendered as fenced code except the first one that retains its double curly brackets (see screenshot).
The workaround I have found is to add an empty character at the start of the paragraph, but this is less than ideal.
``` markdown
## Example fenced inline code that should be fenced
`{{r}} nrow(penguins)` penguins are included in this amazing dataset.
On average they weigh `{{r}} mean(penguins$body_mass, na.rm = TRUE)` grams, though the lightest weighs `{{r}} min(penguins$body_mass, na.rm = TRUE)` g and the heighiest weighs `{{r}} max(penguins$body_mass, na.rm = TRUE)` g.
```
Actual behavior
Inline code snippets are correctly rendered except those that are at the start of a line which retain its double curly brackets.
Expected behavior
All inline code snippets should be rendered with {r}.
Your environment
- IDE: RStudio Version 2026.01.1+403 (2026.01.1+403)
- MacOS Sequoia 15.4.1 (24E263)
Quarto check output
Quarto 1.9.30
[✓] Checking environment information...
Quarto cache location: /Users/lefoll/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.30
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2025.11
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/lefoll/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.5.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.51
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.12.8 (Conda)
Path: /Users/lefoll/miniconda3/bin/python
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[✓] Checking Julia installation...