From 149d6c6e14a1724c96999328683a9264fc508264 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Sat, 28 May 2011 15:01:51 +0300 Subject: Properly expand multiple variables in the same line. When were two or more different variables in the same line, ruleparser used to expand the first one and replace *all* variables (since all variables are matches of variableLine regexp) with that expanded value. The corrent way is to replace that exact variable reference with the expanded value. --- src/ruleparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index ebdba4a..b11ea5b 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -188,7 +188,7 @@ void Rules::load(const QString &filename) qFatal("Undeclared variable: %s", qPrintable(variableLine.cap(1))); } } - line = line.replace(variableLine, replacement); + line = line.replace(variableLine.cap(0), replacement); } if (state == ReadingRepository) { if (matchBranchLine.exactMatch(line)) { -- cgit v1.2.1