Commit 6e6d06dd authored by Eric Jiang's avatar Eric Jiang Committed by Jean-Baptiste Mardelle
Browse files

Don't remove consecutive spaces in SRT subtitles

The Kdenlive UI allows you to add multiple spaces between words in
subtitles. This displays correctly in the UI and is preserved when
saving the SRT file, but the spaces are removed when opening the SRT
file.

Changing line.simplified() to line.trimmed() seems to fix the round-trip
issue.

BUG: 457878
parent 234358f5
......@@ -145,7 +145,7 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
QRegExp rx("([0-9]{1,2}):([0-9]{2})");
QLatin1Char separator = filePath.endsWith(".sbv") ? QLatin1Char(',') : QLatin1Char(' ');
while (stream.readLineInto(&line)) {
line = line.simplified();
line = line.trimmed();
// qDebug()<<"Turn: "<<turn;
// qDebug()<<"Line: "<<line<<"\n";
if (!line.isEmpty()) {
......
1
00:00:05,600 --> 00:00:10,600
three spaces
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment