From e58f0f31b73dc1951f1d1382386b015365dad817 Mon Sep 17 00:00:00 2001 From: jbeder Date: Mon, 15 Mar 2010 04:10:36 +0000 Subject: [PATCH] Set alias nodes to return the tag of their anchor --- include/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/node.h b/include/node.h index b059748..d3cf791 100644 --- a/include/node.h +++ b/include/node.h @@ -77,7 +77,7 @@ namespace YAML bool IsReferenced() const { return m_referenced; } // 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 friend Emitter& operator << (Emitter& out, const Node& node);