Fixed tag output bug

This commit is contained in:
jbeder
2008-11-20 04:12:31 +00:00
parent 4b45a7185a
commit ad2b9fbaaf
2 changed files with 6 additions and 2 deletions

View File

@@ -136,7 +136,11 @@ namespace YAML
// write tag // write tag
if(m_tag != "") { if(m_tag != "") {
out << std::string("!<") << m_tag << std::string("> "); // 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; startedLine = true;
onlyOneCharOnLine = false; onlyOneCharOnLine = false;
} }

View File

@@ -2,4 +2,4 @@
%TAG ! !howdy %TAG ! !howdy
--- ---
- basic node - basic node
- ! yeah baby - ! yeah baby