View Single Post
Old 06-06-2018, 08:22 PM   #1
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 168
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
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.
Vanguard3000 is offline   Reply With Quote