해결됨
I want when the line breaks, the space at the end of the line is not underlined... Indesign CC


Try this, "char" is a reserved word you can't use as variable name
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Revert underlining");
function main () {
var story = app.selection[0].parentStory;
var lines = story.lines.everyItem().getElements();
for (var i = 0; i < lines.length; i++) {
var c = lines[i].characters[-1];
if (c.underline && c.contents == " ") {
c.underline = false;
}
}
}Also, I added a undo 🙂
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.