View Single Post
Old 02-22-2013, 11:50 AM   #13
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
@mjmuk

After checking, the issue turns out to be   as you worked out, but in a slightly different way.

The way the Indexer works is to collect all the text from a paragraph, for example, and then compare your Index Editor entry against that text. So it only sees and compares against text - not HTML code. Just copy the text as you see it in Book View and paste into the Index Editor. Don't use the string "&nbsp;" or HTML codes "<>" in the Index Editor.

But, unfortunately, the Index Editor converts all &nbsp; characters into spaces. So when it goes to match the space against the &nbsp; character in your text, it fails. I will change the program to automatically convert &nbsp; to a space before comparing to work around this in the next release.

There's another issue I found in testing this - if you use Mark for Index in Code View and select HTML tags (or type tag symbols in the dialog). It doesn't convert the & < > / correctly into the title attribute so it can produce invalid HTML if you select text containing HTML tags to use with Mark for Index, so that will need to be corrected as well.

It's may be that I will have to remove the functionality of using a semicolon ";" to allow multiple entries per line on an Index entry, since its required for HTML entities. Another character isn't as suitable and may have similar issues. But I don't think its a critical feature as you can just put one per line, which is more readable anyway.
meme is offline   Reply With Quote