Fuzzy matcher, take simple escaping into account when creating regex.

This commit is contained in:
Dave Davenport 2016-11-26 17:18:38 +01:00
parent 4f3c7f122e
commit 84f7ec2f0e

View file

@ -181,6 +181,11 @@ static gchar *fuzzy_to_regex ( const char * input )
else {
g_string_append ( str, ".*(" );
}
if ( *iter == '\\' ){
g_string_append_c ( str, '\\');
iter = g_utf8_next_char ( iter );
if ( iter == NULL ) break;
}
g_string_append_unichar ( str, g_utf8_get_char ( iter ) );
g_string_append ( str, ")" );
first = 0;