summaryrefslogtreecommitdiff
path: root/src/core/parser/stack/Stack.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-04-12 18:48:56 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:24:16 +0200
commit95ce14b9ea89178ddb8788887db8b4b32ced5d79 (patch)
tree1fb609fbe567370646a6cbf022ce678aa5a192d7 /src/core/parser/stack/Stack.cpp
parent667d9c4a082552fb64c5ffe7b0bd6212c8a8b1b3 (diff)
If in the implicit default field of a non-greedy short form, only read data until whitespace characters are reached. Improve tests accordingly.
Diffstat (limited to 'src/core/parser/stack/Stack.cpp')
-rw-r--r--src/core/parser/stack/Stack.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/parser/stack/Stack.cpp b/src/core/parser/stack/Stack.cpp
index cc1eb23..75a4b49 100644
--- a/src/core/parser/stack/Stack.cpp
+++ b/src/core/parser/stack/Stack.cpp
@@ -1528,8 +1528,11 @@ bool StackImpl::readToken(Token &token)
{
if (dataReader != nullptr) {
dataReader->resetPeek();
- return dataReader->peek(token, currentTokens(),
- currentWhitespaceMode());
+ const HandlerInfo &info = currentInfo();
+ const bool endAtWhitespace =
+ (!info.greedy && info.inImplicitDefaultField);
+ return dataReader->peek(token, currentTokens(), currentWhitespaceMode(),
+ endAtWhitespace);
}
return false;
}