1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 02:50:27 +08:00

add w:u w:i w:b w:highlight

This commit is contained in:
源文雨
2023-02-26 15:31:13 +08:00
parent 0e18f8a163
commit f3265280e3
8 changed files with 88 additions and 22 deletions

View File

@@ -25,7 +25,7 @@ import "strings"
// AddTab adds tab to para
func (p *Paragraph) AddTab() *Run {
c := make([]interface{}, 1, 64)
c[0] = &WTab{}
c[0] = &Tab{}
run := &Run{
RunProperties: &RunProperties{},
@@ -47,7 +47,7 @@ func (p *Paragraph) AddText(text string) *Run {
for i, s := range strings.Split(text, "\t") {
if i > 0 {
c = append(c, &WTab{})
c = append(c, &Tab{})
}
if s != "" {
c = append(c, &Text{