nisus.com
https://www.nisus.com/forum/

Form Paragraph Macro
https://www.nisus.com/forum/viewtopic.php?f=17&t=2506
Page 1 of 1

Author:  hatchmo [ 2007-08-18 10:13:48 ]
Post subject:  Form Paragraph Macro

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.

Author:  martin [ 2007-08-19 19:26:05 ]
Post subject: 

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:
#Combines selected lines into one paragraph
Find and Replace '[\n\r]+', ' ', 'Esa'
Find and Replace '  +', ' ', 'Esa'

Author:  hatchmo [ 2007-08-28 17:58:47 ]
Post subject: 

I believe that's the problem.

Code:
Find and Replace '[\n\r]+', ' ', 'Esa'


Replaces all double-spaces with a space. I would like it not to do that.

Author:  hatchmo [ 2007-08-28 18:17:35 ]
Post subject: 

I changed that line to

Code:
Find and Replace '[\n\r]{1}', ' ', 'Esa'


So that it replaces only single occurences of a return. I think the default macro shipped with a typo.

Author:  martin [ 2007-08-28 23:08:37 ]
Post subject: 

hatchmo wrote:
Code:
Find and Replace '[\n\r]+', ' ', 'Esa'


Replaces all double-spaces with a space. I would like it not to do that.

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?

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/