mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Fixed tag output bug
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -2,4 +2,4 @@
|
|||||||
%TAG ! !howdy
|
%TAG ! !howdy
|
||||||
---
|
---
|
||||||
- basic node
|
- basic node
|
||||||
- ! yeah baby
|
- ! yeah baby
|
||||||
|
Reference in New Issue
Block a user