Fixed escaping @ in boost program options filter

pull/333/head^2
Alexander Stillich 7 years ago
parent 5e69f6033f
commit 7d39c5450c

@ -27,7 +27,8 @@ namespace Files
std::string EscapeHashString::processString(const std::string & str)
{
std::string temp = boost::replace_all_copy<std::string>(str, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sHashIdentifier, "#");
boost::replace_all(temp, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sEscapeIdentifier, std::string((char)escape_hash_filter::sEscape, 1));
auto format = std::string(1, (char)escape_hash_filter::sEscape);
boost::replace_all(temp, std::string() + (char)escape_hash_filter::sEscape + (char)escape_hash_filter::sEscapeIdentifier, format);
return temp;
}

@ -78,6 +78,12 @@ namespace Files
mFinishLine = true;
}
}
else if (character == sEscape)
{
mNext.push(sEscape);
mNext.push(sEscapeIdentifier);
record = false;
}
else if (mPrevious == sEscape)
{
mNext.push(sEscape);

Loading…
Cancel
Save