mark-nicepants / figma2flutter

Converts design token json files to flutter
Apache License 2.0
17 stars 16 forks source link

add negativeNumberPreface #38

Closed apackin closed 1 week ago

apackin commented 1 week ago

https://github.com/mark-nicepants/figma2flutter/issues/33

Negative number variable names (I.E. "-4") currently discard the "-", creating breaking duplicate getters. This replaces "-" with "Negative" for negative numbers rather than omitting it.

freemansoft commented 1 day ago

Looks like this PR broke names like blue-200 These used to convert to blue200 and now blueNegative200

This PR needs to be rolled back or fixed

apackin commented 1 day ago

Got it. Thanks for the flag. I'll update the regex to only consider if the name starts with a - instead of any - proceeding a number. Does that make sense?

freemansoft commented 1 day ago

Opened a PR for this Do we want to remove the digit restrictions in the regex as you proposed @apackin ? https://github.com/mark-nicepants/figma2flutter/pull/42

freemansoft commented 1 day ago

Going to leave the digit restriction in. This test case becomes more complicated because of the case manipulation

apackin commented 1 day ago

Approved the PR. The way you have it looks right.