diff --git a/novelwriter/formats/todocx.py b/novelwriter/formats/todocx.py index 42d42bc5..1a9af220 100644 --- a/novelwriter/formats/todocx.py +++ b/novelwriter/formats/todocx.py @@ -855,12 +855,10 @@ class ToDocX(Tokenizer): xR = xmlSubElem(xP, _wTag("r")) xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "begin"}) xR = xmlSubElem(xP, _wTag("r")) - _wText(xR, " PAGE ") + xmlSubElem(xR, _wTag("instrText"), "PAGE", attrib={_mkTag("xml", "space"): "preserve"}) xR = xmlSubElem(xP, _wTag("r")) xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "separate"}) xR = xmlSubElem(xP, _wTag("r")) - _wText(xR, "0") - xR = xmlSubElem(xP, _wTag("r")) xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "end"}) if post: xR = xmlSubElem(xP, _wTag("r")) diff --git a/tests/reference/fmtToDocX_SaveDocument_header1.xml b/tests/reference/fmtToDocX_SaveDocument_header1.xml index 1135d853..4acc8f9e 100644 --- a/tests/reference/fmtToDocX_SaveDocument_header1.xml +++ b/tests/reference/fmtToDocX_SaveDocument_header1.xml @@ -13,14 +13,11 @@ - PAGE + PAGE - - 0 -