From b3fce8457ff73a31fe889eb7b1315fae2e016cc4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 10 Jan 2024 17:03:13 -0600 Subject: start fixing GetText() and move to any Signed-off-by: Jeff Carr --- common.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common.go') diff --git a/common.go b/common.go index 614a749..28be258 100644 --- a/common.go +++ b/common.go @@ -124,8 +124,11 @@ func (n *Node) AppendText(str string) { // should get the value of the node func (n *Node) GetText() string { + if n.value != nil { + return n.value.(string) + } if (n.S != n.Text) { - log.Warn("GetText() is screwed up. TODO: fix this dumb crap") + log.Warn("GetText() is screwed up. TODO: fix this dumb crap. n.S =", n.S, "and n.Text =", n.Text) } if (n.S != "") { return n.S -- cgit v1.2.3