From dd75a0df96deb6d440eea653c8f6e31b0e7782a0 Mon Sep 17 00:00:00 2001 From: Maiyang Lu <39764509+yangge2333@users.noreply.github.com> Date: Thu, 25 May 2023 11:03:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=BA=BF=E7=9A=84=E6=94=AF=E6=8C=81=20(#6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #5 --- structeffects.go | 6 ++++++ structrun.go | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/structeffects.go b/structeffects.go index 0302330..5aa4741 100644 --- a/structeffects.go +++ b/structeffects.go @@ -111,6 +111,12 @@ type VertAlign struct { Val string `xml:"w:val,attr"` } +// Strike ... +type Strike struct { + XMLName xml.Name `xml:"w:strike,omitempty"` + Val string `xml:"w:val,attr"` +} + // Shade is an element that represents a shading pattern applied to a document element. type Shade struct { XMLName xml.Name `xml:"w:shd,omitempty"` diff --git a/structrun.go b/structrun.go index 8013613..d949371 100644 --- a/structrun.go +++ b/structrun.go @@ -212,6 +212,7 @@ type RunProperties struct { Kern *Kern Underline *Underline VertAlign *VertAlign + Strike *Strike } // UnmarshalXML ... @@ -297,6 +298,10 @@ func (r *RunProperties) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error { var value VertAlign value.Val = getAtt(tt.Attr, "val") r.VertAlign = &value + case "strike": + var value Strike + value.Val = getAtt(tt.Attr, "val") + r.Strike = &value default: err = d.Skip() // skip unsupported tags if err != nil {