Repository navigation
fix(components): keep the case of provided link text - #2304
Merged
Merged
Conversation
An internal link title-cased all of its text, and the link shortcode cased its inner text a second time, external links included. Authored text usually sits mid-sentence, so "read the announcement" rendered as "Read the Announcement". Limit casing to a title retrieved for a link without text, which is what the case argument documents. The sidebar is unaffected: it cases its own labels and passes exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for gethinode-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
Author
|
🎉 This PR is included in version 3.50.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Internal links title-cased all of their text, and the
linkshortcode also cased its inner text, including for external links. Link text usually sits in a sentence, so[read the announcement](/blog/x/)rendered as "Read the Announcement".Casing now applies only to a title retrieved for a link without text, which is what the
caseargument documents.[read this](/x/){{< link href="/x/" >}}read this{{< /link >}}{{< link href="/x/" />}}, page title "my page"case=falsecase=falseBehavior change: a site that relied on title casing for authored link text now renders that text as written. Sidebar labels don't change: the sidebar cases them itself and passes
exact.Verified:
npm run test:templatespasses in all environments. The newlink-casefixture fails 4 cases with the fix reverted.🤖 Generated with Claude Code