|
|
#31 |
|
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
|
How about improving the Text search feature in the search options?
The Text search option is a feature that "does not search tags." When this option is enabled, it ignores the tags themselves and only searches the text content inside them. However, it cannot properly search for text that is split by tags. <p>Sigil <b>Text Search</b></p> With markup like this, it cannot find "Sigil Text Search". I think this option would be much more useful if checking the Text search option ignored tags completely, allowing it to find "Sigil Text Search". |
|
|
|
|
|
#32 |
|
Enthusiast
![]() Posts: 42
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
|
Could you please add the 'Rebase OPF Manifest IDs on Current filenames' feature to the Add Automate tool? I run this before delivering the final file, but I often forget to do it. I'd like to add it to my final check automation list.
|
|
|
|
|
|
#33 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
@BeckyEbook,
Okay, I will look into what changes that would take. If we add a DOCTYPE and or xml header, we would still want to mark that Book as modified just so that people know they need a save or save-as even if they make no changes themselves. Last edited by KevinH; Yesterday at 08:54 PM. |
|
|
|
|
|
#34 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Yes, as others may be interested in that as well, and it is a very minor change.
|
|
|
|
|
|
#35 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Quote:
If you want a pure text search, strip out all tags first and search but you can then forget getting any accurate positional information. That is not something for Sigil. Last edited by KevinH; Yesterday at 10:55 PM. |
|
|
|
|
|
|
#36 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,964
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
PageEdit will find 'Sigil Text Search' in
Code:
<p>Sigil <b>Text Search</b></p> The calibre book editor has a simple Find feature for its Preview window which finds it too, never used it before now. BR |
|
|
|
|
|
#37 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,945
Karma: 24444443
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
|
|
|
|
|
#38 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Quote:
|
|
|
|
|
|
|
#39 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Quote:
The slight complication is the xml header must come absolutely first in an xhtml file but multiple xhtml comments are legal *before* any DOCTYPE. So regular expressions would have to be used to search for any xml header and DOCTYPE and the correct sequence used to put back only what is missing and in the correct order without losing any xhtml comments. This is trivial with gumbo and reserializing the parsed tree and gumbo is completely thread safe so it can be parallelized. |
|
|
|
|
|
|
#40 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,104
Karma: 4000789
Join Date: Jan 2017
Location: Poland
Device: Various
|
@KevinH, right, I'd prefer a plain text insertion over gumbo, simply because it's the smallest possible change: a Checkpoint Compare would show just the added line(s) and nothing else.
I don't think the comments make it complicated though. The XML prolog allows comments both before and after the doctypedecl, so nothing needs to be found or reordered:
The QXmlStreamReader pass in WellFormedErrorForSource already tells us which of the two is missing, so the only regex needed is one anchored at the start for the xml header. And it's a pure QString function, so it parallelizes just as well. If you think this approach is worth a try, I could give it a go this evening and put together a patch for you to look at. I can't promise it'll be ready today though, as each Sigil build takes about 10 minutes on my machine, and I'd like to test it properly with both epub2 and epub3 first. But if you'd rather go with gumbo, that's absolutely fine with me too: the important part for me is just no warning :) |
|
|
|
|
|
#41 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,945
Karma: 24444443
Join Date: Dec 2010
Device: Kindle PW2
|
|
|
|
|
|
|
#42 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,336
Karma: 7640672
Join Date: Nov 2009
Device: many
|
Quote:
I will try to put something together today to handle this in CleanSource that takes care of it using QRegularExpressions limited to the source code before the opening html (to prevent spurious matches after the html tag (as in a commented out doctype, etc). I will push something for testing when I have something. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Features or Improvements post Sigil 2.8.1 | KevinH | Sigil | 155 | 10-03-2026 07:16 PM |
| Improvements? New Features? post sigil 2.7.6 | KevinH | Sigil | 315 | 05-23-2026 11:40 AM |
| Suggestions for Sigil Improvements or New Features | KevinH | Sigil | 241 | 03-02-2026 02:09 PM |
| Suggestions for Sigil Improvements or New Features | KevinH | Sigil | 168 | 11-18-2025 01:23 PM |
| Hello. Where do I make suggestions for future improvements? | spelunker | Sigil | 19 | 02-28-2022 12:46 PM |