Reply To: Delete strikethrough from space at the end of a line?

Home Page / Forums / General InDesign Topics (CLOSED) / Delete strikethrough from space at the end of a line? / Reply To: Delete strikethrough from space at the end of a line?

#126311
David Blatner
Keymaster

Hi Katherine, This is a fascinating question… the problem is that features such as grep styles cannot see where on a line text is… for example, you cannot say “find all the spaces at the end of a line.”
However, scripting allows this. A number of years ago the scripture Jongware wrote a script to remove all the underlines at the end of lines. Very similar problem. You can see that thread here.
So I took that script and edited it slightly to remove strikethroughs. You can download the RemoveStrikethroughs.jsx script here by right-clicking the link and saving the .jsx file to disk. (If it gets saved with .txt at the end, then remove that… so it ends with .jsx.) You can learn how and where to install the script here:
https://indesignsecrets.com/resources/faq#145
Once it’s installed: Select the text you want to apply it to (with the Text tool), then run the script from the Scripts panel. All the spaces at the end of lines will have a character style applied to them… and that style (called “NoStrikethru”) will remove the strikeout formatting.
If the text reflows, you may find those spaces in the middle of paragraphs (with no strike through). So you may have to reapply the strikethrough to those, and then run the script again.

This article was last modified on July 23, 2020

Comments (0)

Loading comments...