Fixed tag output bug

This commit is contained in:
Jesse Beder
2008-11-20 04:12:31 +00:00
parent f8d81fff8c
commit 5a2a317d62
2 changed files with 6 additions and 2 deletions

View File

@@ -136,6 +136,10 @@ namespace YAML
// write tag
if(m_tag != "") {
// put the tag in the "proper" brackets
if(m_tag.substr(0, 2) == "!<" && m_tag.substr(m_tag.size() - 1) == ">")
out << m_tag;
else
out << std::string("!<") << m_tag << std::string("> ");
startedLine = true;
onlyOneCharOnLine = false;