fix: skip inline markdown-pipeline entries - #58
Merged
Conversation
Quarto renders a navigation href, an `about` link, and a page `<meta>` value as a hidden inline snippet, then reads the rendered fragment back with `innerText` and puts the result in an attribute. A converted reference added its platform badge text to that value, so a navbar item whose href was a bare platform user URL lost its target. The three passes that create links now run top-down and skip the content of a `Span` with the `quarto-markdown-envelope-contents` class. Block entries keep their behaviour, because Quarto inserts those with `innerHTML` and references inside them are wanted.
Also cover the `about` links and the social metadata in the navbar test site, and narrow the changelog entry: Pandoc builds `<meta name="description">` from the document metadata rather than from an inline snippet, so that tag is a separate case.
A navigation entry registers its text and its href under one identifier prefix, so a reference in a navbar or sidebar title, in a navigation entry text, or in a next or previous page title no longer converts.
The script renders the site and asserts each expectation, so a change in the envelope class or in the traversal fails loud. It reports six failures against the version before the fix. Also drop the claim about an `about` link target. Quarto registers that target under one key and reads it back under another, so it never substitutes the value and the defect never reached it.
`grep -c` counts matching lines, so two references on one line read as one. Also shorten the changelog entry to two sentences.
mcanouil
force-pushed
the
fix/skip-markdown-envelope-spans-nz8b
branch
from
August 28, 2026 18:42
76264ea to
1a806d8
Compare
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.
A navbar item whose
hrefis a bare platform user URL lost its target. Quarto registers every navigationhrefas an inline markdown snippet so that shortcodes work there, renders it in a hidden envelope span, then reads the fragment back withinnerTextand assigns the result to the attribute. The filter converted the URL into a link with a platform badge, and the link text and the badge text concatenated into thehref.The three passes that create links now run top-down and skip the content of a
Spanwith thequarto-markdown-envelope-contentsclass. Top-down traversal is what makes the skip possible, and theStrpass also stops traversal of its own result, so a created link no longer has its text converted a second time. ADivwith the same class is a block entry, such as the page footer or the margin content, which Quarto inserts withinnerHTML; those keep converting.This costs something. The same inline envelope carries values that Quarto inserts with
innerHTML: a navbar or sidebar title, a navigation entry text, anaboutlink text, and a next or previous page title. A reference in those no longer becomes a link. The two kinds cannot be told apart, because a navigation entry registers its text and itshrefunder one identifier prefix.test/navbar-siteis a new fixture withcheck.sh, which renders the site and asserts each expectation. It passes here and reports six failures against the filter as it stands onmain. The rendered output oftest/sidebar-site,test/widget-site, anddocsis unchanged apart from attribute order inside the badge span, which is Lua table order.