static string const convert_brace_glob(string const & glob)
{
// Matches " *.{abc,def,ghi}", storing "*." as group 1 and
- // "abc,def,ghi" as group 2.
- static lyx::regex const glob_re(" *([^ {]*)\\{([^ }]+)\\}");
- // Matches "abc" and "abc,", storing "abc" as group 1.
- static lyx::regex const block_re("([^,}]+),?");
+ // "abc,def,ghi" as group 2, while allowing spaces in group 2.
+ static lyx::regex const glob_re(" *([^ {]*)\\{([^}]+)\\}");
+ // Matches "abc" and "abc,", storing "abc" as group 1,
+ // while ignoring surrounding spaces.
+ static lyx::regex const block_re(" *([^ ,}]+) *,? *");
string pattern;
{
QString s;
- bool const has_description = desc_.empty();
+ bool const has_description = !desc_.empty();
if (has_description) {
s += toqstr(desc_);
void FileFilterList::parse_filter(string const & filter)
{
- // Matches "TeX documents (*.tex)",
- // storing "TeX documents " as group 1 and "*.tex" as group 2.
- static lyx::regex const filter_re("([^(]*)\\(([^)]+)\\) *$");
+ // Matches "TeX documents (plain) (*.tex)",
+ // storing "TeX documents (plain) " as group 1 and "*.tex" as group 2.
+ static lyx::regex const filter_re("(.*)\\(([^()]+)\\) *$");
match_results<string::const_iterator> what;
if (!lyx::regex_search(filter, what, filter_re)) {
if (type == "listing")
return qt_("List of Listings");
if (type == "index")
- return qt_("List of Indexes");
+ return qt_("List of Index Entries");
if (type == "marginalnote")
return qt_("List of Marginal notes");
if (type == "note")