Skip to content

fix(components): keep the case of provided link text - #2304

Merged
markdumay merged 1 commit into
mainfrom
fix/link-case-provided-text
Nov 2, 2026
Merged

markdumay merged 1 commit into
mainfrom
fix/link-case-provided-text

Conversation

@markdumay

Copy link
Copy Markdown
Collaborator

Internal links title-cased all of their text, and the link shortcode 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 case argument documents.

Link Before After
[read this](/x/) Read This read this
{{< link href="/x/" >}}read this{{< /link >}} Read This read this
{{< link href="/x/" />}}, page title "my page" My Page My Page
Same, with case=false my page my page
Text provided with case=false lowercased as written

Behavior 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:templates passes in all environments. The new link-case fixture fails 4 cases with the fix reverted.

🤖 Generated with Claude Code

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>
@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gethinode-demo ready!

Name Link
🔨 Latest commit 6645a90
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6ae8af7206ca66601f1afdff
😎 Deploy Preview https://deploy-preview-2304--gethinode-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markdumay
markdumay merged commit 3e8c7bf into main Nov 2, 2026
17 checks passed
@markdumay
markdumay deleted the fix/link-case-provided-text branch November 2, 2026 16:10
@markdumay

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 3.50.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant