mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #723] [MERGED] fix(fonts): handle nested-brace options objects in self-hosting transform #799
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#799
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/723
Author: @james-elicx
Created: 3/30/2026
Status: ✅ Merged
Merged: 3/30/2026
Merged by: @james-elicx
Base:
main← Head:fix/font-nested-brace-options📝 Commits (2)
fd164d6fix(fonts): handle nested-brace options objects in self-hosting transformcb9754ffix(fonts): address bonk review — template literal interpolations, dedup, hoisting📊 Changes
3 files changed (+341 additions, -6 deletions)
View changed files
📝
packages/vinext/src/index.ts(+3 -0)📝
packages/vinext/src/plugins/fonts.ts(+155 -6)📝
tests/font-google.test.ts(+183 -0)📄 Description
Summary
namedCallReandmemberCallReused\{[^}]*\}which stops at the first}, silently skipping self-hosting for any font call whose options contain a nested object (e.g.Inter({ subsets: ["latin"], axes: { wght: 400 } }))findBalancedObject()helper that tracks brace depth and skips string literals🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.