#14 The editor.replace() function doesn't work on big documents

v1.0
closed-fixed
5
2014-02-14
2012-02-21
3ICE
No

I wrote a script (attached to this bug report) with the intent to automate replacing some fancy Unicode characters with their simple ASCII equivalents in txt and html documents. The script works fine on small files, (no problems encountered up to 100kb), but some larger books are simply blanked or replaced with 1-2 characters. (Seen quotation marks ("), apostrophes ('), and dashes (--) so far.) And occasionally I will find a chunk of it missing.

The issue is reproducible with those books, if I undo and try again.
But if I fill a file with megabytes of randomness the replace function still works on that.
However, if I add a couple of the characters I am looking to replace to that random document, it suddenly gets a chunk bitten out of it by the plugin.

Discussion

  • 3ICE
    3ICE
    2012-02-21

    The script I am trying to run on ebooks

     
    Attachments
    • Group: --> v1.0
     
  • Fixed in v1.0

    I can't obviously test that in your case (with your books), it still works, but when 1.0 is released (should be this weekend), you're welcome to test it. The replace() and rereplace() have been rewritten to be faster, and not break on large documents or when many replacements are performed, so I would hope that it will work with the new version.

     
    • status: open --> closed-fixed