size_t const colon = line->find (":");
SUB_ASSERT (colon != string::npos);
- SUB_ASSERT (line->length() > colon + 1);
string const type = line->substr (0, colon);
- string const body = line->substr (colon + 2);
+ string body = line->substr (colon + 1);
+ trim (body);
switch (part) {
case INFO:
} else if (event_format[i] == "End") {
sub.to = parse_time (event[i]);
} else if (event_format[i] == "Style") {
+ /* libass trims leading '*'s from style names, commenting that
+ "they seem to mean literally nothing". Go figure...
+ */
+ trim_left_if (event[i], boost::is_any_of ("*"));
SUB_ASSERT (styles.find(event[i]) != styles.end());
Style style = styles[event[i]];
sub.font = style.font_name;
BOOST_AUTO_TEST_CASE (ssa_reader_test2)
{
test ("DKH_UT_EN20160601def.ssa");
+ test ("dcpsubtest-en.ssa");
}
#define SUB_START(f, t) \