Add DocX test coverage

This commit is contained in:
Veronica Berglyd Olsen
2024-10-21 16:59:43 +02:00
parent 148d46fcbc
commit 787e1a46d1
16 changed files with 2041 additions and 26 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
"""
novelWriter ToOdt Class Tester
=================================
================================
This file is a part of novelWriter
Copyright 20182024, Veronica Berglyd Olsen
@@ -48,8 +48,8 @@ XML_NS = [
def xmlToText(xElem):
"""Get the text content of an XML element."""
rTxt = ET.tostring(xElem, encoding="utf-8", xml_declaration=False).decode()
for nSpace in XML_NS:
rTxt = rTxt.replace(nSpace, "")
for ns in XML_NS:
rTxt = rTxt.replace(ns, "")
return rTxt