With Editor2, is there a way to automatically replace line breaks with spaces?
Such an option would be useful for reformatting text copied from Acrobat PDF files. Because there's an issue with how text is formatted in PDF files. To format paragraphs and text layout on a page, Acrobat resorts to inserting line breaks between sentences. Here's an example of a copied paragraph from a PDF magazine using Acrobat's text selection tool...
Like chocolate and peanut butter,
tower defense games and zombies
were made for each other. But it
took the twisted genius of casual gaming
impresario Popcap to build
the towers out of wacky plants.
There are also no spaces at the end of each line.
Way to replace line breaks with spaces?
Moderators: fgagnon, nikos, Site Mods
Use Search -> Replace to find all occurrences of '$0D' and replace them with '$20'.
![Image](http://img89.imageshack.us/img89/7185/searcho.jpg)
Keep in mind that this is a "dumb" search, in the sense that it will also replace legitimate paragraph breaks with spaces, which may not be what you want, so perhaps letting it confirm each one (instead of "Replace All") might be a better approach, depending on the number of lines you have to convert.
This could be avoided by doing three "passes" - the first to change all occurrences of '$0D$0D' (de facto two consecutive line breaks, in other words, a "true" paragraph break) with some phrase like "I_Breathe_What_You_Call_Sorrow", then do the above replace (this time selecting "All") of $0D (single) for $20, then make a third pass to reconvert all "I_Breathe_What_You_Call_Sorrow" instances back into $0D$0D.
As ed2 keeps these previous items in its drop-down menus, the multiple-pass method isn't as arduous as it seems.
![Image](http://img89.imageshack.us/img89/7185/searcho.jpg)
Keep in mind that this is a "dumb" search, in the sense that it will also replace legitimate paragraph breaks with spaces, which may not be what you want, so perhaps letting it confirm each one (instead of "Replace All") might be a better approach, depending on the number of lines you have to convert.
This could be avoided by doing three "passes" - the first to change all occurrences of '$0D$0D' (de facto two consecutive line breaks, in other words, a "true" paragraph break) with some phrase like "I_Breathe_What_You_Call_Sorrow", then do the above replace (this time selecting "All") of $0D (single) for $20, then make a third pass to reconvert all "I_Breathe_What_You_Call_Sorrow" instances back into $0D$0D.
As ed2 keeps these previous items in its drop-down menus, the multiple-pass method isn't as arduous as it seems.
Welcome to the wonderful (?) world of hexadecimal ASCII, which once upon a time was drilled into the impressionable minds all children who dreamed of writing printer drivers, or imitating Marcel Proust, as the mood struck them.
At 13, I was regrettably unable to grow the moustache, so I memorised the ASCII table instead. A life well wasted.
![Image](http://upload.wikimedia.org/wikipedia/commons/7/7e/Marcel_Proust_1900.jpg)
At 13, I was regrettably unable to grow the moustache, so I memorised the ASCII table instead. A life well wasted.
![Image](http://upload.wikimedia.org/wikipedia/commons/7/7e/Marcel_Proust_1900.jpg)