Participant
December 23, 2024
Question
My GREP with style restriction does not work in InDesign server
- December 23, 2024
- 3 replies
- 801 views
Hi.
I want to replace the strings ": " or "- " by a carriage return when the style applied to the test is "GROUP1:SUBGROUP1:title2".
I have a stored GREP with the following properties:
- Find waht: (: |- )
- Change to: \n
- Find Format: Paragraph Style: title2 (GROUP1:SUBGROUP1)
- Include footnotes: enabled
This GREP is called within a script.
app.loadFindChangeQuery ("tempGrep", SearchModes.GREP_SEARCH);
app.documents[0].changeGrep();It works fine in InDesign desktop (version 20.0.1 and 19.5.1). It returns 3 occurrences.
It does not work in InDesig server (version 20.0.0.95). It returns 1080 occurrences.
I have also tried to not use the stored GREP but configure the properties in a script:
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
app.findChangeGrepOptions.kanaSensitive = false;
app.findChangeGrepOptions.widthSensitive = false;
app.findGrepPreferences.findWhat = "(: |- )";
app.findTextPreferences.appliedParagraphStyle = doc.paragraphStyleGroups.item('GROUP1').paragraphStyleGroups.item('SUBGROUP1').paragraphStyles.item('title2');
app.changeGrepPreferences.changeTo = "\n";
app.documents[0].changeGrep();It does not even work on desktop, also 1080 occurrences.
I have attached the stored GREP file.
Am I missing something?
Is there a bug in InDesign server?
Thanks in advance for any help.
