Earlier versions of Nisus Writer used to ship with a "Form Paragraph" macro that preserved double-spaces in the selected text.
Does anyone still have that routine/macro you could post for me? I'm having a tough time converting the perl macro so that it doesn't turn all the selected text into one massive paragraph.
Form Paragraph Macro
Form Paragraph Macro
Al Hatch
- martin
- Official Nisus Person
- Posts: 5228
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
The "Form Paragraph" macro that ships with NWP should preserve any double-spaces in your text. It's default menu location is Macro > changing text > Form Paragraph. In case something happened to the macro, here it is:
Code: Select all
#Combines selected lines into one paragraph
Find and Replace '[\n\r]+', ' ', 'Esa'
Find and Replace ' +', ' ', 'Esa'
I believe that's the problem.
Replaces all double-spaces with a space. I would like it not to do that.
Code: Select all
Find and Replace '[\n\r]+', ' ', 'Esa'
Al Hatch
I changed that line to
So that it replaces only single occurences of a return. I think the default macro shipped with a typo.
Code: Select all
Find and Replace '[\n\r]{1}', ' ', 'Esa'
Al Hatch
- martin
- Official Nisus Person
- Posts: 5228
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Did you quote the wrong line of code? That line replaces one or more newlines, it does not replace any spaces, single or double. Or perhaps you meant that you wanted to preserve double-newlines?hatchmo wrote:Replaces all double-spaces with a space. I would like it not to do that.Code: Select all
Find and Replace '[\n\r]+', ' ', 'Esa'