diff --git a/cppman/main.py b/cppman/main.py index e8c58ae..3a6576e 100644 --- a/cppman/main.py +++ b/cppman/main.py @@ -198,7 +198,7 @@ def rebuild_index(self): % (table, k, k, k, k, k, k)).fetchall() for id, keyword in sql_results: - keyword = keyword.replace("%s" % k, "%s" % a) + keyword = re.sub(re.escape("%s" % k), "%s" % a, keyword, flags=re.IGNORECASE) self.db_cursor.execute( 'INSERT INTO "%s_keywords" (id, keyword) '