Delete space from the end of a layer's name

Hi guys!
I’m working with my team on an extensive design system and we had a problem switching icon instances inside a component. All the icons were organized in components with the same layers and names, but for some reason, when we changed the instance some icons changed their color according to the button design and some of them didn’t. We tried to solve it for hours and even days but couldn’t find the reason, we thought it was a bug.
Today I finally found out what was the problem!
In some of the layers’ names, a space was accidentally added.
My offer is that Figma will ignore a space at the end of the layer’s name.

You can easily remove them yourself using a simple regex command:

Hi, thank you, it really helps to change the names quickly!
But the problem was that it took us time to notice the space at the end of the layer name and we weren’t aware at all that it can cause this problem.
I think that space without text after it in a layer name is not needed, it has no purpose. If Figma would auto-delete the space or ignore it the whole problem didn’t exist :slight_smile:

1 Like