<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So spaces could certainly be deleted, you just have to figure out the<br>
algorithm for deciding which ones to delete, 2 in a row, something else?<br>
<br></blockquote></div><br></div><div class="gmail_extra">That's en easy one: replace each <space><space> with <space>. Repeat until no replacement is done.<br><br></div><div class="gmail_extra">I have a Word macro doing just that, I used it a lot a few years ago when I was receiving contributions for a magazine. I run my macro manually until it says "0 replacements were done", but that part can most likely be automated.<br><br></div><div class="gmail_extra">I also had a macro converting "double enter" paragraphs break into real ones. What it does is that first it replaced all paragraph breaks by line breaks. Then all <line break><whitespace><line break> were replaced by <line break><line break> (sometimes the empty line between two paragraphs have a space or a tab), then all double line breaks were replaced by paragraph breaks before all remaining line breaks were replaced by a space.<br><br></div><div class="gmail_extra">This will however remove any intentional mid-paragraph line break, so care must be taken to not run it blindly. Usually such mid-paragraph line breaks can be circumvented by using hard spaces or soft hyphenation instead of a line break.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">/Peter<br></div></div>