1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-07 16:50:24 +08:00

feat: 增加对删除线的支持 (#6)

fix #5
This commit is contained in:
Maiyang Lu
2023-05-25 11:03:00 +08:00
committed by GitHub
parent 050781fdde
commit dd75a0df96
2 changed files with 11 additions and 0 deletions

View File

@@ -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 {