You must be logged in to post Login

Search Forums:


 






find/replace character at soft line endings

UserPost

9:17 am
May 7, 2011


indecello

New Member

posts 2

Hi everyone,

i need to find all slashes at soft line endings of a text and join the word like in the example:

"… hallo/

there" should become:

"… hallo/there"

Does anyone knows a way to force a No Divide (split) command to a word containing a slash (or any other symbol) or a javascript for such a thing? i am working on a huge document…

thanks a lot

marcello

3:13 am
May 9, 2011


Jongware

Member

posts 764

The 'soft line endings' cannot be found with regular Find/Change, but you can access lines through Javascript.

But doing this with a Javascript for this is extremely tricky — it changes the line ending, and that could imply that a previously untouched occurrence would need to be changed as well (and that in turn may influence yet other line breaks, or — because InDesign has a very advanced "complete paragraph" based composition engine — even the one line that caused this particular change …)


I'd use a GREP style for this. Make a character style that only applies "No Break", and have it applied to this GREP string:

\w/\w

3:28 am
May 9, 2011


indecello

New Member

posts 2

thank's that's perfect, easy and fast!!!

i just thought that no brake style could only be applyed to paragraphs.


thanks again


marcello