Repository navigation
Keep dashboard HTML output mistaken for bslib output in its card - #15024
Merged
cderv merged 1 commit intoOct 12, 2026
Merged
Conversation
The dashboard filter lifts a cell's raw HTML output out of its card when it takes the output for bslib components, and it tested for them with the Lua pattern `bslib-`. In a Lua pattern `-` is a quantifier, so the pattern matched any text containing `bsli`, such as the word "subslide" or the name `bslib` without a hyphen. That output left its card, and a card with nothing else in it was dropped, title included. The hyphen is now escaped, so the pattern matches only the literal `bslib-`, the prefix bslib uses in its classes, ids, attributes and custom elements. Closes quarto-dev#15023
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #15023.
The dashboard filter lifts a cell's raw HTML output out of its card when it takes the output for bslib components. It tested for them with
text:match('bslib-'). In a Lua pattern-is a quantifier (zero or more of the preceding character, as few as possible), so the pattern matched any text containingbsli, for example:bslibwith no hyphen.Such output left its card, and a card with nothing else in it was dropped, title included.
The pattern is now
'bslib%-'. It matches only the literalbslib-, the prefix bslib uses in its classes, ids, attributes and custom elements such as<bslib-tooltip>.One real component changes. py-shiny's
ui.accordion()without anidnames its elementsbslib_accordion_*and contains nobslib-, so it was lifted only through the loose match. It now stays in its cell's card, with the card's title, like any other output. Two related outputs are still lifted:bslib::accordion(), whose ids arebslib-accordion-*;id, which adds the classbslib-accordion-input.Not changed here:
#| expandable: falseand shows Expand button #14719, where cell options are not applied to real bslib output that is lifted;c:match("^column-")inquarto-pre/parsefiguredivs.lua, which has the same unescaped-but is anchored.Tests
New
tests/docs/smoke-all/2026/10/11/issue-15023.qmd, a dashboard with three Python cells:bslib-class must still be lifted out of its cell's card.The selectors are scoped to
.card.cell, the card built from a cell. Without the fix all three outputs are lifted, so no cell card is left. The dashboard then wraps the page's loose content, those outputs included, in a card of its own without.cell. A selector on.cardalone, such as.card .test-subslide, would match inside that card and pass.Locally:
.card.cell .test-subslide.false), it fails on.card.cell .test-lifted, so the test also catches real bslib output left in its card.docs/smoke-all/dashboard/.bslib::value_box()renders byte-identical HTML with and without the fix.Checklist
I have (if applicable):
docs/smoke-all/dashboard/, run locallyAI-assisted PR
.claude/rulesandllm-docs