From 6459a6c256c2ea65bd69f1699d09ee52bd29baf2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Jun 2009 09:10:41 -0700 Subject: [PATCH] Fix #2670 (Xpath chapter detection wizard not working) --- src/calibre/gui2/convert/xpath_wizard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/convert/xpath_wizard.py b/src/calibre/gui2/convert/xpath_wizard.py index d2a0d55a48..9b8e44ddaa 100644 --- a/src/calibre/gui2/convert/xpath_wizard.py +++ b/src/calibre/gui2/convert/xpath_wizard.py @@ -31,6 +31,8 @@ class WizardWidget(QWidget, Ui_Form): q = '[re:test(@%s, "%s", "i")]'%(attr, val) else: q = '[@%s]'%attr + elif val: + q = '[re:test(., "%s", "i")]'%(val) expr = '//'+tag + q return expr