未验证 提交 c5990ea3 编写于 作者: V vst 提交者: GitHub

Preserve horizontal tab character when set the cell value (#1108)

上级 89b85934
...@@ -409,7 +409,7 @@ func setCellStr(value string) (t string, v string, ns xml.Attr) { ...@@ -409,7 +409,7 @@ func setCellStr(value string) (t string, v string, ns xml.Attr) {
} }
if len(value) > 0 { if len(value) > 0 {
prefix, suffix := value[0], value[len(value)-1] prefix, suffix := value[0], value[len(value)-1]
for _, ascii := range []byte{10, 13, 32} { for _, ascii := range []byte{9, 10, 13, 32} {
if prefix == ascii || suffix == ascii { if prefix == ascii || suffix == ascii {
ns = xml.Attr{ ns = xml.Attr{
Name: xml.Name{Space: NameSpaceXML, Local: "space"}, Name: xml.Name{Space: NameSpaceXML, Local: "space"},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册