Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50080

[BUG] Incorrect Case with the test field

$
0
0
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

Viewing all articles
Browse latest Browse all 50080

Latest Images

Trending Articles



Latest Images