View Single Post
Old 09-13-2018, 07:45 PM   #16
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 451
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by deback View Post
Glad it worked for you. I knew it would, because I always have to run the Beautify Files before I search for anything. If I don't do that, the search function will almost always NOT work correctly. I don't know if this is a bug in the Search function or not, but running the Beautify Files is definitely a necessity when you want to search for something.

This solution should be added to the instructions for the Search function.
I think this is most important for searches that span variable spaces or line breaks. Some of it can be got around by using regex \s+ where appropriate, but that isn't always enough.

Other than beautifying, I have a couple of things that help.

One is a saved search that replaces spaces before a </p> or </div>.

The other is my dynamite fix for files that have way too much white space: regex search for \n and replace it with a space. Then search for two spaces and replace with a single space--run that a few times until the results hit zero replacements. Then beautify the file. This will neaten up the worst mess imaginable, and I've never yet had it destroy a file, even though it looks like it will after the first step!
retiredbiker is offline   Reply With Quote