Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2020, 12:09 PM   #1
Patrick V
Junior Member
Patrick V began at the beginning.
 
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
Patrick V is offline   Reply With Quote
Old 02-10-2020, 12:33 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Advert
Old 02-10-2020, 01:07 PM   #3
Patrick V
Junior Member
Patrick V began at the beginning.
 
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.
Patrick V is offline   Reply With Quote
Old 02-10-2020, 01:30 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Old 02-10-2020, 02:07 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,759
Karma: 5706256
Join Date: Nov 2009
Device: many
The fix for this will appear in the next release.
KevinH is online now   Reply With Quote
Advert
Old 02-11-2020, 03:08 AM   #6
Patrick V
Junior Member
Patrick V began at the beginning.
 
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
Patrick V is offline   Reply With Quote
Old 02-11-2020, 09:12 AM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Reply

Tags
sigil index bug


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:41 PM.


MobileRead.com is a privately owned, operated and funded community.