Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2020, 01:21 PM   #1
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
[BUG] Incorrect Case with the test field

I discover a bug in the "Search and Replace" module:
When the "Character match" mode is selected, the Case is not correctly applied to the test result field (based on s_r_do_regexp() )

I'm not too sure what to do to submit the fix, so there you go:

in the s_r_paint_results()
source code
Code:
self.test_result.setText(self.s_r_obj.sub(self.s_r_func,
                         unicode_type(self.test_text.text())))
new code
Code:
t = self.s_r_obj.sub(self.s_r_func, unicode_type(self.test_text.text()))
if self.search_mode.currentIndex() == 0:
    rfunc = self.s_r_functions[unicode_type(self.replace_func.currentText())]
    t = rfunc(t)
self.test_result.setText(t)
https://github.com/un-pogaz/calibre/...ca05d82ef62a3c

Last edited by un_pogaz; 12-07-2020 at 01:27 PM.
un_pogaz is offline   Reply With Quote
Old 12-07-2020, 10:54 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...ca5f7ae1acdec6
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom series field bug (?) Nitro Calibre Companion 2 01-12-2016 09:40 AM
2.x UI bug: How to dismiss dropdown menu in Tags field? MelBr Calibre 10 10-19-2014 04:18 PM
Please, test if your Paperwhite has this bug Antoinekamel Amazon Kindle 6 10-20-2012 07:21 PM
[Bug?] Field(s) in prefix/suffix Backi Library Management 5 03-13-2012 06:22 AM


All times are GMT -4. The time now is 04:35 PM.


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