You can do this with the replace function (in the Edit menu).
Suppose you have the following text:
Code:
This is a part of
a broken paragraph.
These are really.
Two paragraphs.
You can mark the paragraphs to be merged by putting some text at the merge points that doesn't occur anywhere in the document. This could be something like XXXXX or as I have chosen: a single strange character like §. Now go to the code view. It looks like:
Code:
<p>This is a part of§</p>
<p>a broken paragraph.</p>
<p>These are really.</p>
<p>Two paragraphs.</p>
Now copy the part from the § up to and including the <p> on the next line. Put the cursor before the first text to be merged. Then choose the Replace function from the edit menu, and paste the copied text in the 'Find what' field. It will look like
but in reality one or more of the spaces will be a newline character. In the 'Replace with' field enter a single space character. Then hit Replace all.
This supposes that all the broken paragraphs are the same, i.e. the same amount of newlines and spaces in between. If this is not the case you have to use a regular expression. Click the 'More' button and select Regular Expression, and in the 'Find what' field use:
In a regular expression \s* means zero or more whitespace.
Sometimes there may be additional whitespace at the end of the first part or the beginning of the second part. To get rid of these add additional \s* at the proper places. E.g.
Code:
\s*§\s*</p>\s*<p>\s*
There may also be extra linebreaks between the parts, which manifests themselves in the code view as <br /> or something similar. To get rid of these you add (<br\s*/>)? at the proper place. This means zero or one line breaks. And the / in the line break may be preceded by zero or more whitespace. So the total 'Find what' field then could become a bit more complicated:
Code:
\s*§\s*</p>\s*(<br\s*/>)?\s*<p>\s*