// "[,,,,foo..." -> "foo..." ("foo..." may be empty)
string output;
lyx::smatch what;
- static lyx::regex const front("^( *[[],*)(.*)$");
+ static lyx::regex const front("^( *\\[,*)(.*)$");
regex_match(it, end, what, front);
if (!what[0].matched) {
// Strip any trailing commas
// "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
- static lyx::regex const back("^(.*[^,])?,*[]] *$");
+ static lyx::regex const back("^(.*[^,])?,*\\] *$");
+ // false positive from coverity
+ // coverity[CHECKED_RETURN]
regex_match(output, what, back);
if (!what[0].matched) {
lyxerr << "Unable to sanitize LaTeX \"Option\": "
return;
Factory factory = boost::any_cast<Factory>(any_factory);
- if (!factory.empty())
+ if (factory)
transformer = factory(data);
}