changeset 3227:c545e53c1b76

Documented _addTextElem and fixed indentation
author Mikko Virkkil? <mvirkkil@cc.hut.fi>
date Sun, 09 Mar 2008 16:39:29 +0100
parents 42a7e375e4fd
children c7fabea3fb4f
files MoinMoin/formatter/text_docbook.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_docbook.py	Sun Mar 09 16:23:02 2008 +0100
+++ b/MoinMoin/formatter/text_docbook.py	Sun Mar 09 16:39:29 2008 +0100
@@ -710,9 +710,14 @@
             self.cur.removeChild(self.cur.firstChild)
     
     def _addTextElem(self, target, elemName, text):
-            newElement = self.doc.createElement(elemName)
-            newElement.appendChild(self.doc.createTextNode(text))
-            target.appendChild(newElement)
+        """
+        Creates an element of the name elemName and adds a text node to it
+        with the nodeValue of text. The new element is then added as a child
+        to the element target.
+        """
+        newElement = self.doc.createElement(elemName)
+        newElement.appendChild(self.doc.createTextNode(text))
+        target.appendChild(newElement)
         
     
     def _addRevisionHistory(self, targetNode):