Edit Book: Replace All doesn't work like Find & Replace and seems completely buggy

Bug #1264387 reported by arspr on 2013-12-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Well, the indicated trouble that I've found in "Infinite Jest" where I'm trying to "beautify" its links.

I upload a test book.

Use the following Search (remember Regex mode):
<a href="InfiniteJest_note-1([a-b]).html#endnote_text_(\d+)"> <sup>(\d+)</sup> </a> <a id="endnote_reference_(\d+)"></a>

With this Replace:
<a href="InfiniteJest_note-1\1.html#endnote_text_\2"><sup>[\3]</sup></a><a id="endnote_reference_\4"></a>

If you Find and then Replace you will get the correct replacement, where the text "[456]" is the new link.

But If you directly launch a Replace All you get a real strange thing. (I copy the obtained replacement although you can test it yourself):
"></a>456]</sup></a><a id="endnote_reference_456"><sup>[456.html#endnote_text_a<a href="InfiniteJest_note-1

I'm on Calibre Portable 1.17 on W7 64-bit.

arspr (arspr) wrote :
Kovid Goyal (kovid) wrote :

Works for me. The replacement with Replace all and Find & Replace is:

<p><a href="InfiniteJest_note-1a.html#endnote_text_456"><sup>[456]</sup></a><a id="endnote_reference_456"></a></p>

I'm guessing this is a symptom of the same mysterious count all bug on your computer. Follow it up there.

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers