diff options
author | xuri <xuri.me@gmail.com> | 2020-04-06 00:23:27 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-04-06 00:23:27 +0800 |
commit | 66d0272f6af59b5f0c97a304379a795420a43e8b (patch) | |
tree | 2d7f059160e6bb4cb3dc57964c87f0a200a519c8 /comment.go | |
parent | 0f2a9053246c3ae45e6c7ba911a1fb135664abdf (diff) |
Resolve #172, init rich text support
Diffstat (limited to 'comment.go')
-rw-r--r-- | comment.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -50,7 +50,9 @@ func (f *File) GetComments() (comments map[string][]Comment) { sheetComment.Text += *comment.Text.T } for _, text := range comment.Text.R { - sheetComment.Text += text.T + if text.T != nil { + sheetComment.Text += text.T.Val + } } sheetComments = append(sheetComments, sheetComment) } @@ -263,7 +265,7 @@ func (f *File) addComment(commentsXML, cell string, formatSet *formatComment) { RFont: &attrValString{Val: stringPtr(defaultFont)}, Family: &attrValInt{Val: intPtr(2)}, }, - T: a, + T: &xlsxT{Val: a}, }, { RPr: &xlsxRPr{ @@ -274,7 +276,7 @@ func (f *File) addComment(commentsXML, cell string, formatSet *formatComment) { RFont: &attrValString{Val: stringPtr(defaultFont)}, Family: &attrValInt{Val: intPtr(2)}, }, - T: t, + T: &xlsxT{Val: t}, }, }, }, |