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

run add wpg

This commit is contained in:
源文雨
2023-03-05 23:31:26 +08:00
parent 57f2532bec
commit bce9c3b8dc

View File

@@ -124,7 +124,7 @@ func (r *Run) parse(d *xml.Decoder, tt xml.StartElement) (child interface{}, err
if ttt, ok := tok.(xml.StartElement); ok && ttt.Name.Local == "Choice" {
for _, attr := range ttt.Attr {
if attr.Name.Local == "Requires" {
if attr.Value == "wps" || attr.Value == "wpc" {
if attr.Value == "wps" || attr.Value == "wpc" || attr.Value == "wpg" {
tok, err = d.Token() // go into choice
if err != nil {
return nil, err