Mercurial > clickerconvert
changeset 75:92139cc60121
Treat everything from the start of the document as the first question
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 04 Oct 2016 17:12:28 +0200 |
parents | 9a2e35a7c19c |
children | 1e6e7699f0b8 |
files | src/converter.cpp |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);