Fix a bug in element.to_text()
authorNick Downing <nick@ndcode.org>
Mon, 16 May 2022 15:49:57 +0000 (01:49 +1000)
committerNick Downing <nick@ndcode.org>
Mon, 16 May 2022 15:49:57 +0000 (01:49 +1000)
ndcode/pitree/skel/element.py

index b1eb364..f40c9cf 100644 (file)
@@ -126,7 +126,7 @@ def to_text(root):
     [
       j
       for i in range(len(root.children))
-      for j in [root.text[i], to_text(root[i])]
+      for j in [root.text[i], to_text(root.children[i])]
     ] +
     [root.text[-1]]
   )