# HG changeset patch # User Andre Heinecke # Date 1475593948 -7200 # Node ID 92139cc601213fbc2ddf7038d5a0aa80e2772bd4 # Parent 9a2e35a7c19cbe1fc5fb73538a76cdbdf5e5fd30 Treat everything from the start of the document as the first question diff -r 9a2e35a7c19c -r 92139cc60121 src/converter.cpp --- a/src/converter.cpp Tue Oct 04 17:12:02 2016 +0200 +++ b/src/converter.cpp Tue Oct 04 17:12:28 2016 +0200 @@ -219,8 +219,13 @@ return; } foundSomething = true; - QString question = match.captured(1).trimmed(); + /* For some reason the regular expression used is not + * greedy enough if there are multiple question lines + * before the first Answer. */ + QString question = input.left(match.capturedStart() + + match.captured(1).size()); unescapeString(question); + qDebug() << "First question: " << question; const QString answerLine = match.captured(2).trimmed(); xlsx.write(row, 2, QString(" "), mQuestionFmt); xlsx.write(row, 3, QString(" "), mQuestionFmt);