Conditional content div ignores additional attributes (id, extra classes) on same div
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
Research direction
Start with the minimal Quarto Markdown example in the issue and render it to HTML using the reported Quarto version. Trace conditional-content div handling and compare the generated section attributes with the expected class; done means the additional class and other attributes are preserved while the condition still works.
Written by the indexing model from the issue text.
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
When a fenced div uses a conditional content class such as .content-visible or .content-hidden, other attributes on that same div appear to be dropped or ignored in output. For example, custom IDs and additional classes are not preserved as expected.
Steps to reproduce
Create a div with some attribute (e.g., a class) and a .content-visible class with some condition:
:::{.slide-in-handout .content-visible when-meta="make.slide"}
## Div text
Day handsome addition horrible sensible goodness two contempt. Evening for married his account removal. Estimable me disposing of be moonlight cordially curiosity. Delay rapid joy share allow age manor six. Went why far saw many knew. Exquisite excellent son gentleman acuteness her. Do is voice total power mr ye might round still.
:::
Actual behavior
In the rendered HTML, the div tag (which is actually turned into a <section>) does not contain the .slide-in-handout class.
<section>
Expected behavior
Since conditional content is technically a div, using Pandoc's div syntax, I would have expected that other attributes are preserved in the HTML output.
<section class="slide-in-handout">
Your environment
VSCode on Windows 11
Quarto check output
Quarto 1.9.36
[>] Checking environment information...
Quarto cache location: C:\Users\cberger\AppData\Local\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.36
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[>] Checking LaTeX....................OK
Tex: (not detected)
[>] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Source: Windows Registry
[>] Checking basic markdown render....OK
[>] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
[>] Checking Python 3 installation....(None)
Unable to locate an installed version of Python 3.
Install Python 3 from https://www.python.org/downloads/
[>] Checking Julia installation...
- 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 ·