TW-1947: "urgency.over" filter seems to not work correct

- Thanks to Marc Richter.
This commit is contained in:
Paul Beckingham 2018-01-24 23:57:44 -05:00
parent c242730b6d
commit 751ae17b22
4 changed files with 35 additions and 7 deletions

View file

@ -1279,7 +1279,7 @@ void CLI2::desugarFilterAttributes ()
A2 op ("", Lexer::Type::op);
op.tag ("FILTER");
A2 rhs ("", Lexer::Type::string);
A2 rhs ("", values[0]._lextype);
rhs.tag ("FILTER");
// Special case for '<name>:<value>'.
@ -1372,16 +1372,21 @@ void CLI2::desugarFilterAttributes ()
reconstructed.push_back (op);
// Do not modify this construct without full understanding.
if (values.size () == 1 || ! evalSupported)
// Getting this wrong breaks a whole lot of filtering tests.
if (values.size () > 1 || evalSupported)
{
if (Lexer::isDOM (rhs.attribute ("raw")))
rhs._lextype = Lexer::Type::dom;
for (auto& v : values)
reconstructed.push_back (v);
}
else if (Lexer::isDOM (rhs.attribute ("raw")))
{
rhs._lextype = Lexer::Type::dom;
reconstructed.push_back (rhs);
}
else
for (auto& v : values)
reconstructed.push_back (v);
{
reconstructed.push_back (rhs);
}
found = true;
}