![]() |
Plugin to ignore tags when searching?
I'm wondering if anyone has made a modification to Sigil that allows a user to specify when doing a find/replace to ignore html/css tags and header information.
As an example, I recently had a book that often — and inconsistently-used a simple minus sign to separate a sentence instead of an em- or en-dash (as seen in my cleverly-hidden example earlier in this sentence). But the search was rather obnoxious as searching for the minus sign gave me a lot of false positives inside style tags (e.g. <p class="italic-and-bold">). Given that the minus sign was also frequently-used as in my use of the phrase "frequently-used", I had enough false positives to sift through as it was! I've found a few examples of regexes that can be used to ignore these tags, such as Timur's examples here, but I'm a pretty lazy guy and was wondering if there were an easier way in the form of a Sigil plugin. Ideally, what I'm imagining is an additional dropdown menu in the search/replace panel's "Mode" section, that would have the options to "Ignore Tags", "Only Search in Tags", and "Search Everywhere". Does anything like this exist? Thanks for the help. |
It exists in the calibre editor https://manual.calibre-ebook.com/edi...ring-html-tags
@mods Apologies if this is out of line in the Sigil forum, if so, please feel free to delete, but I figured that it might be helpful to the OP. |
I normally use regular expressions to restrict matches to being outside tags. This is relatively straight forward and will greatly diminish your false positives. I believe this was already discussed in the Sigil Regular Expression thread. Simple text search in BookView works as well although I hate to push BookView to anyone.
|
I use the spellchecker for this particular case, Show all words, Filter for -. It's available in Sigil and calibre editor spellcheckers, and in the calibre editor's Tools->Reports->Words tool.
BR |
Quote:
We've had a couple people in the past who liked to camp out and point out calibre equivalents for every single feature/assistance request that newcomers brought up in the Sigil forum. I freely admit that THAT tended to get on my nerves after a while. But you're welcome to comment here any time, Kovid. :D |
Quote:
|
| All times are GMT -4. The time now is 08:57 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.