Reply To: Remove character at the end of a line of wrapped text

Home Page / Forums / General InDesign Topics (CLOSED) / Remove character at the end of a line of wrapped text / Reply To: Remove character at the end of a line of wrapped text

#85219
Ari Singer
Member

You’re absolutely right, but Peter didn’t care about that because in this situation he knew there will only be discretionary line breaks after a comma. So he didn’t bother. But in the real world if there was such a case then that line will be written as such:

if ((lines[j].characters[-1].contents == SpecialCharacters.DISCRETIONARY_LINE_BREAK) && (lines[j].characters[-2].contents = ",")) {
        lines[j].characters[-2].appliedCharacterStyle = 'Hide';

Which basically says: If the last character is a discretionary line break and there is a comma before that, then…

This article was last modified on May 25, 2016

Comments (0)

Loading comments...