Recently I had the need for a macro that converts paragraphs into a single line. I do not use this often, but it was very useful when needed. Here is the summary from the author of a similar macro from my previous editor (dated 1994):
This goes through a file converting each paragraph into a single line
with an EOL (whatever is set in the editor) at the end. It will also make sure
that all periods, question marks and exclamation points that are followed
by spaces are followed by at least TWO spaces.
Is that something that can be added to Cuda or is it something I have missed?
As always, ant help will be appreciated.
Joe
Can a Macro with specific functionality be added
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Two different tasks are here-
a) append spaces after .?!
b) convert paragraphs to lines.
Task a) can be solved by RegEx replace.
Find what: ([\.\?!])\x20(\S)
Replace with: "$1 $2"
note: 2 spaces between $1 and $2.
note: turn ON dialog option '$0'.
Task b) - try to solve with RegEx too.
Find what: (\S)\n(\S)
Replace with: "$1 $2"
note: turn ON dialog option '$0'.
a) append spaces after .?!
b) convert paragraphs to lines.
Task a) can be solved by RegEx replace.
Find what: ([\.\?!])\x20(\S)
Replace with: "$1 $2"
note: 2 spaces between $1 and $2.
note: turn ON dialog option '$0'.
Task b) - try to solve with RegEx too.
Find what: (\S)\n(\S)
Replace with: "$1 $2"
note: turn ON dialog option '$0'.