From b082fb6a16e8f6b0b81677debb5c8d22c585421a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 May 2016 23:13:54 +0100 Subject: Add another test and allow spaces at the end of time/position lines. --- src/subrip_reader.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/subrip_reader.cc') diff --git a/src/subrip_reader.cc b/src/subrip_reader.cc index a82862c..ea693db 100644 --- a/src/subrip_reader.cc +++ b/src/subrip_reader.cc @@ -113,6 +113,10 @@ SubripReader::read (function ()> get_line) case METADATA: { vector p; + + /* 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 (" ")); if (p.size() != 3 && p.size() != 7) { throw SubripError (*line, "a time/position line"); -- cgit v1.2.3