Commit d02fcf6
fix: use replaceAll for duplicate token references in composite values (#3499)
* Initial plan
* fix: use replaceAll for duplicate token references in composite values
When the same token reference (e.g. {sizes.0.5}) appears more than once
in a composite value, String.replace() only replaces the first occurrence.
Changed to String.replaceAll() in both Token.expandReferences() and
expandReferences() utility to resolve all occurrences correctly.
Fixes #2996
Co-authored-by: anubra266 <30869823+anubra266@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chakra-ui/panda/sessions/45fce8e1-9a22-443c-8b3f-9565bd0190ae
* Add changeset for duplicate token references fix
Co-authored-by: anubra266 <30869823+anubra266@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chakra-ui/panda/sessions/6617edb1-1a07-446f-a728-a7e7fb23f177
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: anubra266 <30869823+anubra266@users.noreply.github.com>1 parent 5125b73 commit d02fcf6
File tree
5 files changed
+58
-2
lines changed- .changeset
- packages/token-dictionary
- __tests__
- src
5 files changed
+58
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
4 | 29 | | |
5 | 30 | | |
6 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments