From 13843b3a6d521489ee58ebf9e3218e1317756e19 Mon Sep 17 00:00:00 2001 From: Manuel Naranjo Date: Tue, 7 Aug 2012 15:24:14 -0300 Subject: Prefix rules should keep spaces if they are part of the rule This patch fixes a small bug with prefix rules where a prefix like: prefix I\ Am\ A\ Very\ Ugly\ Path/ will not match as the match was made against \S and not .* making the spaces not part of the match. Signed-off-by: Manuel Naranjo --- src/ruleparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ruleparser.cpp') diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index b11ea5b..437f3f8 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -141,7 +141,7 @@ void Rules::load(const QString &filename) QRegExp matchBranchSubstLine("substitute branch\\s+(.+)$", Qt::CaseInsensitive); QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive); QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive); - QRegExp matchPrefixLine("prefix\\s+(\\S+)", Qt::CaseInsensitive); + QRegExp matchPrefixLine("prefix\\s+(.*)$", Qt::CaseInsensitive); QRegExp declareLine("declare\\s+("+varRegex+")\\s*=\\s*(\\S+)", Qt::CaseInsensitive); QRegExp variableLine("\\$\\{("+varRegex+")(\\|[^}$]*)?\\}", Qt::CaseInsensitive); QRegExp includeLine("include\\s+(.*)", Qt::CaseInsensitive); -- cgit v1.2.1