From f80f7aa9cdd43aa3f850914dcbaed84a93c042ce Mon Sep 17 00:00:00 2001 From: Tyler Sommer Date: Fri, 1 Aug 2025 08:55:19 -0600 Subject: [PATCH] Avoid encoding empty titlePg values --- wml/ctypes/sectionProp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wml/ctypes/sectionProp.go b/wml/ctypes/sectionProp.go index 137733c..a55bc01 100644 --- a/wml/ctypes/sectionProp.go +++ b/wml/ctypes/sectionProp.go @@ -78,7 +78,7 @@ func (s SectionProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error { } } - if s.TitlePg != nil { + if s.TitlePg != nil && s.TitlePg.Val != "" { if err = s.TitlePg.MarshalXML(e, xml.StartElement{ Name: xml.Name{Local: "w:titlePg"}, }); err != nil {