Fixed empty string emitter bug (it now with auto-quote it

This commit is contained in:
Jesse Beder
2011-09-06 00:24:10 -05:00
parent 3e94c0a037
commit 7e129c9b64
2 changed files with 12 additions and 0 deletions

View File

@@ -128,6 +128,9 @@ namespace YAML
}
bool IsValidPlainScalar(const std::string& str, bool inFlow, bool allowOnlyAscii) {
if(str.empty())
return false;
// first check the start
const RegEx& start = (inFlow ? Exp::PlainScalarInFlow() : Exp::PlainScalar());
if(!start.Matches(str))