mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Set alias nodes to return the tag of their anchor
This commit is contained in:
@@ -77,7 +77,7 @@ namespace YAML
|
|||||||
bool IsReferenced() const { return m_referenced; }
|
bool IsReferenced() const { return m_referenced; }
|
||||||
|
|
||||||
// for tags
|
// for tags
|
||||||
const std::string GetTag() const { return m_tag; } // TODO: should an aliased node return its alias's tag?
|
const std::string GetTag() const { return IsAlias() ? m_pIdentity->GetTag() : m_tag; }
|
||||||
|
|
||||||
// emitting
|
// emitting
|
||||||
friend Emitter& operator << (Emitter& out, const Node& node);
|
friend Emitter& operator << (Emitter& out, const Node& node);
|
||||||
|
Reference in New Issue
Block a user