From 26fea0e123246b4f122beb54559c8dcd82925071 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 5 Mar 2016 16:31:28 -0800 Subject: [PATCH] Fix skipping over existing spaces when exporting to EBU STL ac5f40a543c1dec8d49ccee1ce1b2faca66e7863 made it so that the N in \N was skipped, but broke the space case, resulting in two spaces between each word. Closes #1887. --- src/subtitle_format_ebu3264.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/subtitle_format_ebu3264.cpp b/src/subtitle_format_ebu3264.cpp index a9594f26d..4c47fa54f 100644 --- a/src/subtitle_format_ebu3264.cpp +++ b/src/subtitle_format_ebu3264.cpp @@ -284,17 +284,17 @@ namespace text_rows.emplace_back(); cur_row = &text_rows.back(); cur_row->emplace_back("", underline, italic, true); + + start = i + 2; } else // if (substr == " " || substr == "\\n") { cur_row->back().text.append(" "); cur_row->emplace_back("", underline, italic, true); - } - if (text[i] == '\\') - start = ++i + 1; - else - start = i; + start = i + 1 + (text[i] == '\\'); + } + ++i; } // add the remaining text