Fix failure to parse subrip where there are extra spaces in the time/position line.
[libsub.git] / src / subrip_reader.cc
index 6fab0ffcbdcfed813a7207dbbcda35d513daa115..45da3ab949d4324767b3068ca65d19a1c512b1a9 100644 (file)
@@ -113,7 +113,7 @@ SubripReader::read (function<optional<string> ()> get_line)
                        /* Further trim this line, removing spaces from the end */
                        trim_right_if (*line, boost::is_any_of (" "));
 
-                       boost::algorithm::split (p, *line, boost::algorithm::is_any_of (" "));
+                       boost::algorithm::split (p, *line, boost::algorithm::is_any_of (" "), boost::token_compress_on);
                        if (p.size() != 3 && p.size() != 7) {
                                for (int i = 0; i < 2; ++i) {
                                        optional<string> ex = get_line ();