Commit fefae525 authored by David E. DeMarle's avatar David E. DeMarle

Merge branch 'noboost2' into 'master'

restore the whitespace trim, xdmf files in VTK's suite fail without

See merge request !45
parents 0f652507 4fb76839
......@@ -227,7 +227,22 @@ public:
}
}
if(!whitespace) {
itemProperties.insert(std::make_pair("Content", content));
std::string contentString(content);
// find first nonwhitespace
unsigned int start = 0;
int check = contentString.find_first_not_of(" \t\n\r\f\v");
if (check >= 0)
{
start = check;
}
unsigned int end = contentString.size();
check = contentString.find_last_not_of(" \t\n\r\f\v");
if (check >= 0)
{
end = check;
}
contentString = contentString.substr(start, end - start + 1);
itemProperties.insert(std::make_pair("Content", contentString));
itemProperties.insert(std::make_pair("XMLDir", mXMLDir));
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment