Fixed emitting colon at end of scalar bug

This commit is contained in:
jbeder
2010-12-03 21:52:04 +00:00
parent 6f6e096316
commit 7fd040c311
3 changed files with 26 additions and 3 deletions

View File

@@ -58,7 +58,13 @@ namespace YAML
template<>
inline bool RegEx::IsValidSource<StringCharSource>(const StringCharSource&source) const
{
return source || m_op == REGEX_EMPTY;
switch(m_op) {
case REGEX_MATCH:
case REGEX_RANGE:
return source;
default:
return true;
}
}
template <typename Source>