🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2464

CS3 GREP Bug Fixed in CS4

#2464
From: Rick_Quatro
Date: Tue, 16 Dec 2008 13:45
26 lines
1561 bytes
Hello all,

I am using findGrep to find and delete hard-coded bullets on paragraphs. I am using this to find the bullets (with optional spaces before and after them).

// Remove the bullets.
app.findGrepPreferences.findWhat = " *~8 *(?=\\w)";
app.changeGrepPreferences.changeTo = "";
var foundItems = oPgf.findGrep();
if (foundItems.length);
{
  oPgf.changeGrep();
}

When I use this via JavaScript, the return at the end of the paragraph is deleted and restored, so that the paragraph format of the following paragraph becomes the same as the paragraph being processed. If I do this via the interface, only the bullet (and spaces) is deleted.

My workaround to prevent this behavior is to set the changeTo text to an Indent to Here character:

app.changeGrepPreferences.changeTo = "~i";

When there is changeTo text, the paragraph is no longer merged with the next one.

I tested it with CS4 and it corrects this behavior.

Rick Quatro
rick at frameexpert dot com
585-659-8267
Technical Details
Message-ID: <59b74813.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2!feeder.erje.net!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,5ab966b963401fd7,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Rick_Quatro@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: CS3 GREP Bug Fixed in CS4
Message-ID: <59b74813.-1@webcrossing.la2eafNXanI>
Date: Tue, 16 Dec 2008 05:45:07 -0800
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2!feeder.erje.net!news4us.nl!webcrossing