function mode: surprising count
Hi
I tried some functions within an EPUB. One which is included in the help file (hyphen) and another which was custom-built for me by a MR Spanish friend. The two are working very fine and are quite helpful.
However, they seem to suffer from the same small defect: when the function has been done, the Calibre editor displays a small window announcing the job done, and offers to show me where the replacements did take place. It also announces the number of occurrences replaced. This is here where the "error" appears.
I found each time for each function that the reported number of occurrences was wrong. In both cases, it looks like the counting is out of touch with reality.
- For the hyphens, it reported over 2000 occurrences replaced when it really replaced about 30 (the text had been proof-read and I did introduce voluntary mistakes).
- For the other function, it consistently reported 1386 occurrences (even if the search was expanded), but when I checked later with a plain regex it did in fact replace 1802 occurrences.
Last edited by roger64; 06-18-2016 at 04:10 AM.
|