Treat .qmd and .Rmd files as Markdown#2172
Merged
Merged
Conversation
Quarto (.qmd) and R Markdown (.Rmd) are popular Markdown variants. Previously they fell through to the plaintext parser, causing URLs inside fenced code blocks to be extracted as links (e.g. shell substitutions like $(arch) producing surprising failures). Closes #2157
md and markdown come first, followed by mdx, qmd, rmd, then the long tail of legacy extensions.
b3b5331 to
4b57d5e
Compare
katrinafyi
reviewed
Apr 29, 2026
katrinafyi
left a comment
Member
There was a problem hiding this comment.
The functional change set is fine but this comment and its implications are eyebrow raising. It doesn't need to be fixed in this PR, but also might as well.
Member
|
I've made a commit at treat-qmd-rmd-as-markdown...rina-forks:lychee:treat-qmd-rmd-as-markdown to fix up the iterator. |
also update readme to fix test
Now that FileExtensions iterates forward (via IntoIterator) instead of popping from the end, store MARKDOWN_EXTENSIONS and HTML_EXTENSIONS in their documented popularity order and drop the obsolete reverse-order note. This keeps default_extensions() output consistent with the documented default.
Member
Author
|
Thanks, @katrinafyi, I've cherry-picked your commit into the branch. Looks fine to me. 😊 |
Member
Author
|
Thanks for the support. |
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.
Quarto (.qmd) and R Markdown (.Rmd) are popular Markdown variants. Lychee was parsing them as plaintext, so URLs inside fenced code blocks were extracted as links, including ones with shell substitutions like $(arch) that fail link checks.
This adds qmd and rmd to the list of Markdown extensions. Case-insensitive lookup already handles .Rmd.
Includes fixtures reproducing the example from the issue and CLI tests confirming that real links are extracted while code-block URLs are skipped by default.
Closes #2157