![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2019
Device: Kobo Aura H2O
|
Bug in index creation with Sigil
Hi,
I found a problem in indexing in Sigil. The terms I need to index are inside footnotes, more precisely in <a></a> To reproduce the problem, consider a simple epub page with those lines: <body> <p><a id="here">This is not a pipe</a></p> <p><a id="there">This is not a pipe (but) </a></p> </body> The lines differ by the presence of parenthesis in the second <p>. If you mark a term in the second line, it will not appear in the index because of the parenthesis. Same problem with brackets. I use Sigil 0.9.7 in Linux, but I reproduced the problem in latest version on Windows. Regards, Patrick |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,759
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Did you mark the parenthesis or brackets too or just the string "but"? Or does this happen with any word being selected?
If only with the bracketed word, have you tried inserting a single space between "but" and the surrounding parentheses or brackets? I will look into it when I get back to my dev machine. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2019
Device: Kobo Aura H2O
|
I marked a word outside the parenthesis. But if there is a parenthesis everywhere within the <a> </a>, the word is not indexed.
No error is reported when you mark a word in a sentence with parenthesis or when you create the index. I did not try to mark the word inside the parenthesis. |
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,759
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Okay, this is caused by the () or [] being interpreted as QRegularExpression special characters instead of normal characters. But since QRegularExpressions are also used to build indexes, we have to be careful how we fix this without breaking things.
Thank you for your bug report, and testcase. |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,759
Karma: 5706256
Join Date: Nov 2009
Device: many
|
The fix for this will appear in the next release.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2019
Device: Kobo Aura H2O
|
Another problem I discovered. If you want to mark a word in this block:
<a class="myclass">This is not a pipe</a> The class "sigil_index_marker" will replace "myclass". It'd be better to add "sigil_index_marker" alongside the existing class. Patrick |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,759
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Yes, this problem only happens if the text you mark for index inclusion's immediate parent is already an anchor and one that has an existing class. The more general case typically causes a new anchor to be inserted and so no class collision is possible.
This should now be fixed in master. Again, thank you for your bug report. |
![]() |
![]() |
![]() |
Tags |
sigil index bug |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug in the creation of the summary on Kindle | Pyanepsion | Conversion | 0 | 08-29-2018 03:42 AM |
[BUG] Index lists all words starting with string | 1v4n0 | Sigil | 9 | 05-17-2018 01:28 PM |
Change index split names after epub creation? | nws | ePub | 2 | 04-08-2015 02:54 AM |
New bug on table of contents creation? | saxondawg | Conversion | 3 | 06-22-2011 12:34 AM |
Automatic index links creation in mobipocket | ragdoll | Kindle Formats | 1 | 02-08-2008 07:07 AM |