Support single quotes in font color tags.
[libsub.git] / src / subrip_reader.cc
index 268582dc66f37027a8965dc3cd7d1c110c5013d2..c0ef21c5848586c3f8b4e0a717f695002dd97cdc 100644 (file)
@@ -261,7 +261,7 @@ SubripReader::convert_line (string t, RawSubtitle& p)
                        p.underline = false;
                } else if (has_next(t, i, "<font") || has_next(t, i, "<Font")) {
                        maybe_content (p);
-                       boost::regex re (".*color=\"?#([[:xdigit:]]+)\"?");
+                       boost::regex re (".*color=[\"\']?#([[:xdigit:]]+)[\"\']?");
                        boost::smatch match;
                        string tag;
                        while (i < t.size() && t[i] != '>') {