lukasoppermann / design-tokens

🎨 Figma plugin to export design tokens to json in an amazon style dictionary compatible format.
https://www.figma.com/community/plugin/888356646278934516/Design-Tokens
MIT License
964 stars 134 forks source link

Recent update breaks export variables #265

Closed ryanzec closed 1 year ago

ryanzec commented 1 year ago

With the latest version, I am no longer able to export tokens when I include variables, I just get this error:

Screen Shot 2023-08-14 at 7 23 55 AM

I tried both enabling and disabling the new mode reference feature.

ryanzec commented 1 year ago

This seems to be related to this change: https://github.com/lukasoppermann/design-tokens/pull/263/files#diff-ebe8de5eee60114c6d10956453c31e12c53c196abfeca396733d76a1d52465f3L261 I believe the escaping is require in that context (my regex is not the best but changing it back allow me to export variables again).

ryanzec commented 1 year ago

It does seem like the linting thinks those are not needed so not really sure what is going on with it.

ryanzec commented 1 year ago

Ok, so it seem like one of the character should be escape but all escape was removed, it seems like this regex works : /^{[\w\s.\-_/@+&:]*}$/ : and passes linting

lukasoppermann commented 1 year ago

Just published the change, can you verify if it works?

ryanzec commented 1 year ago

Yea, that latest version seems good