summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ssa_reader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ssa_reader.cc b/src/ssa_reader.cc
index 93e96f2..05c908e 100644
--- a/src/ssa_reader.cc
+++ b/src/ssa_reader.cc
@@ -230,7 +230,7 @@ SSAReader::parse_line (RawSubtitle base, string line)
}
break;
case STYLE:
- if (c == '}') {
+ if (c == '}' || c == '\\') {
if (!current.text.empty ()) {
subs.push_back (current);
current.text = "";
@@ -250,7 +250,11 @@ SSAReader::parse_line (RawSubtitle base, string line)
} else if (style == "\\an7" || style == "\\an8" || style == "\\an9") {
current.vertical_position.reference = sub::TOP_OF_SCREEN;
}
+
style = "";
+ }
+
+ if (c == '}') {
state = TEXT;
} else {
style += c;