Repository navigation
Fix duplicated Quarto markdown list text - #2183
Open
LeonidasZhak wants to merge 1 commit into
Open
LeonidasZhak wants to merge 1 commit into
LeonidasZhak wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
Fix duplicated list text in Quarto output for
fmt_markdown()cells.Thanks to maintainers
Thanks to the gt maintainers for triaging this issue and maintaining Quarto support.
Issue or motivation
Closes #2140. A list-only Markdown cell still duplicates its items in newer Quarto, despite the earlier fix for a similar case in #1957.
Root cause
The base64 wrapper added for #1957 in #1958 handles Quarto's text escaping, but its inline
<span>containers remain around block Markdown. Newer Quarto treats the list content as inline text while retaining the list markup, which duplicates the item text.Change
Use block-level
<div>containers when the rendered Markdown contains block elements, while preserving<span>containers for inline-only content. Add regression coverage for both cases and a NEWS entry.Tests
devtools::test(filter = "fmt_markdown"): 22 passed.R CMD build --no-manual --compact-vignettes=gs+qpdf: passed.R CMD check --as-cran --no-manual: passed with one NOTE for the development version.covr::package_coverage()and Cobertura export: passed, 75.46% coverage.pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE): passed; reported existing missing alt-text notices.Scope
Changes only the Quarto HTML wrapper selected for block versus inline Markdown, with regression coverage for
fmt_markdown()and a NEWS entry. It leaves inline-only markup, non-Quarto rendering, and other output formats unchanged.