- ::findAttribute now tolerates missing values, as it should if I'd written
  it properly in the first place.
This commit is contained in:
Paul Beckingham 2014-05-31 18:18:20 -04:00
parent 2da3258dd0
commit 5b8aef5463

View file

@ -803,7 +803,8 @@ void Parser::findAttribute ()
std::string value; std::string value;
if (n.getQuoted ('"', value) || if (n.getQuoted ('"', value) ||
n.getQuoted ('\'', value) || n.getQuoted ('\'', value) ||
n.getUntilEOS (value)) n.getUntilEOS (value) ||
n.depleted ())
{ {
std::string canonical; std::string canonical;
if (canonicalize (canonical, "uda", name)) if (canonicalize (canonical, "uda", name))
@ -849,7 +850,10 @@ void Parser::findAttribute ()
branch->attribute ("raw", "=="); branch->attribute ("raw", "==");
branch = (*i)->addBranch (new Tree ("argAtt")); branch = (*i)->addBranch (new Tree ("argAtt"));
branch->attribute ("raw", value); if (value != "")
branch->attribute ("raw", value);
else
branch->attribute ("raw", "'" + value + "'");
} }
} }
} }