Skip to content

Commit 13843b3

Browse files
author
Manuel Naranjo
committed
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 <manuel@evolution.com>
1 parent 371abec commit 13843b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ruleparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void Rules::load(const QString &filename)
141141
QRegExp matchBranchSubstLine("substitute branch\\s+(.+)$", Qt::CaseInsensitive);
142142
QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive);
143143
QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive);
144-
QRegExp matchPrefixLine("prefix\\s+(\\S+)", Qt::CaseInsensitive);
144+
QRegExp matchPrefixLine("prefix\\s+(.*)$", Qt::CaseInsensitive);
145145
QRegExp declareLine("declare\\s+("+varRegex+")\\s*=\\s*(\\S+)", Qt::CaseInsensitive);
146146
QRegExp variableLine("\\$\\{("+varRegex+")(\\|[^}$]*)?\\}", Qt::CaseInsensitive);
147147
QRegExp includeLine("include\\s+(.*)", Qt::CaseInsensitive);

0 commit comments

Comments
 (0)