thierryc / Sketch-Find-And-Replace

Sketch plugin to do a find and replace on text within layers
Apache License 2.0
711 stars 37 forks source link

Find/Replace text but not style #54

Open elegantscience opened 7 years ago

elegantscience commented 7 years ago

First: this is an excellent plugin. Love it. This issue should in no way detract from that fact. But it's something I've encountered and thought I'd post it.

In a text block in which different styling occurs (e.g.,: text block that might read "This Week: Wombats" one might have colored "This Week:" black, and "Wombats" white. Or another example would be specific, highlighted words in a paragraph) I find that when I do a find/replace changing just one word within that block (e.g., changing all instances of "Wombats" to "Owls") the style of the changed text gets carried over to the entire block of text (e.g., "This Week: Owls" turns all white).

Just thought I'd post it. But maybe I'm missing something.

thanks.

thierryc commented 7 years ago

Than you for your comment.

This issue is a limitation to the Sketch App plugin lib. The inline style can be restored only if the source and target string length are close.

I leave this issue open. Any suggestion to fix this issue is welcome.

thierryc commented 7 years ago

Thank you @turbobabr

http://sketchplugins.com/d/442-inline-style-in-a-text-layer