]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTransforms.C
insetcharstyle drawing cosmetics
[lyx.git] / src / insets / ExternalTransforms.C
index 4e0f73b4f3b73f424116728e8e95f252338d221f..3a6059a288c6f4b43327b217cabff08e4df83db7 100644 (file)
@@ -273,7 +273,7 @@ string const sanitizeLatexOption(string const & input)
        string::const_iterator it = begin;
 
        // Strip any leading commas
-       // "[,,,,foo..." -> "foo..."
+       // "[,,,,foo..." -> "foo..." ("foo..." may be empty)
        string output;
        boost::smatch what;
        static boost::regex const front("^( *[[],*)(.*)$");
@@ -281,7 +281,7 @@ string const sanitizeLatexOption(string const & input)
        regex_match(it, end, what, front, boost::match_partial);
        if (!what[0].matched) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "
-                      << output << '\n';
+                      << input << '\n';
                return string();
        }
        it =  what[1].second;
@@ -301,8 +301,8 @@ string const sanitizeLatexOption(string const & input)
        }
 
        // Strip any trailing commas
-       // "...foo,,,]" -> "...foo"
-       static boost::regex const back("^(.*[^,])(,*[]] *)$");
+       // "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
+       static boost::regex const back("^(.*[^,])?,*[]] *$");
        regex_match(output, what, back);
        if (!what[0].matched) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "