summaryrefslogtreecommitdiff
path: root/comment.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-04-06 00:23:27 +0800
committerxuri <xuri.me@gmail.com>2020-04-06 00:23:27 +0800
commit66d0272f6af59b5f0c97a304379a795420a43e8b (patch)
tree2d7f059160e6bb4cb3dc57964c87f0a200a519c8 /comment.go
parent0f2a9053246c3ae45e6c7ba911a1fb135664abdf (diff)
Resolve #172, init rich text support
Diffstat (limited to 'comment.go')
-rw-r--r--comment.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/comment.go b/comment.go
index 610eae8..e224502 100644
--- a/comment.go
+++ b/comment.go
@@ -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},
},
},
},