Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
bddd31b6 by Philipp Hörist at 2025-12-20T16:45:10+01:00
cfix: Fix indentation level in Node.topretty()
- - - - -
2 changed files:
- nbxmpp/simplexml.py
- test/unit/test_node.py
Changes:
=====================================
nbxmpp/simplexml.py
=====================================
@@ -213,7 +213,8 @@ class Node:
)
count += 1
- string += indent
+
+ string += indent
if (len(self.data) - 1) >= count:
data = XMLescape(self.data[count].strip())
=====================================
test/unit/test_node.py
=====================================
@@ -55,6 +55,20 @@ class TestNode(unittest.TestCase):
node = Node(node=string)
self.assertEqual(str(node), string)
+ string = """<a xmlns="http://www.gajim.org/xmlns/undeclared">
+ <b>
+ <c>
+ <d/>
+ <e/>
+ <f/>
+ </c>
+ </b>
+</a>
+"""
+
+ node = Node(node=string)
+ self.assertEqual(str(node), string)
+
if __name__ == "__main__":
unittest.main()
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/bddd31b67dcf989e02c4692bcc40100534929dde
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/bddd31b67dcf989e02c4692bcc40100534929dde
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]