View Single Post
Old 09-13-2018, 11:15 PM   #18
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by deback View Post
You can do various searches, but you always have to run Beautify Files first for the search function to work, no matter what you'll be searching for.

After you run Beautify Files, then you can run just one Regex search for \s+</p> and replace with </p>--to delete one space or more than one space with this simple command. There's no need to run multiple searches to delete the spaces before ending tags, such as </p>, </div>, </span>, etc. You don't even have to run Beautify Files afterward, since you ran it before the search.
I'll have to disagree with this. When cleaning a book, I do a lot of the search and replaces before the beautify. In fact, one of my saved searches is to unwrap text that someone though should be only 80 characters long. Fixing that after a beautify is a lot harder.

For the situation that @roger64 is reporting, I generally do that fairly early, so it is before the beautify. I haven't had any issues doing this. A problem is exactly what type of space is used in these otherwise empty paragraphs. Generally, it means selecting one and pressing CTR+F and change that, and then repeating this with one of the ones that were missed gets the rest. It would be interesting to see the original file to see what was actually going on.
davidfor is offline   Reply With Quote