Commit cecdbbff authored by Michael Büsch's avatar Michael Büsch

xmlfactory: Use the specified line break chars for comment line breaks

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent 00dadd57
......@@ -189,7 +189,7 @@ class XmlFactory(object):
def __tags2text(self, tags, indent=0):
ret = []
for tag in tags:
for tagIndex, tag in enumerate(tags):
ind = "\t" * indent
# Force convert attrs to str and remove empty attrs
attrs = { str(aName) : str(aVal)
......@@ -215,7 +215,7 @@ class XmlFactory(object):
# Add comment, if any.
def addComment(commentData):
if commentData.startswith("\n"):
prefix = "\n"
prefix = "" if (tagIndex == 0) else self.__lineBreakStr
commentData = commentData[1:]
else:
prefix = ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment