quarto-dev / quarto-dev/quarto-cli
Adding href to a sidebar section breaks Markdown formatting
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
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
For the sidebar of a website, a section without an href acts as a collapsible menu which supports Markdown formatting like bold:
- section: "**More info**"
contents:
- href: about.qmd
You can also add an href, and then clicking on that section brings you to that page:
- section: "**More info**"
href: more-info.qmd
contents:
- href: about.qmd
However, adding an href breaks the Markdown formatting of the section. The example above would render as "**More info**", instead of "More info". For example:
HTML formatting still works however:
- section: "<b>More info</b>"
href: more-info.qmd
contents:
- href: about.qmd
Unlike the Markdown example, the example above renders correctly as "More info".
A fix is proposed in #14521.
Steps to reproduce
Put all of the files in a folder and then do quarto render:
_quarto.yaml
project:
type: website
website:
title: "My Quarto Website"
sidebar:
contents:
- href: index.qmd
text: Home
- section: "**More info**"
href: more-info.qmd # comment to hide bug
contents:
- href: about.qmd
format:
html:
toc: true
index.qmd
---
title: "Sidebar demo"
---
## Welcome
Demo of issue with sidebar render
### Sections
- Visit our [About](about.qmd) page
- Get in [Contact](contact.qmd)
more-info.qmd
---
title: "More info"
---
## More info
This section contains additional information about us.
- [About](about.qmd)
about.qmd
---
title: "About"
---
## About Us
Lorem ipsum
Actual behavior
Markdown formatting is rendered as plain text in sidebar sections when an href is used.
Expected behavior
Markdown formatting is preserved in sidebar sections when an href is used.
Your environment
- IDE: any (VS Code / Sublime / Positron)
- OS: Ubuntu 24.04
Quarto check output
Quarto 1.9.37
[✓] Checking environment information...
Quarto cache location: /home/cliffk/.cache/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.37
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2023
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.0
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.48
rmarkdown: (None)
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
[✓] Checking Python 3 installation....OK
Version: 3.13.9 (Conda)
Path: /software/conda/bin/python
Jupyter: 5.8.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...
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
Reproduce the issue from the supplied _quarto.yaml and .qmd files by running quarto render. Then trace the website sidebar rendering path for sections that include both href and contents; done means Markdown such as More info remains formatted instead of appearing as literal asterisks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100