commit | 517453c4870ea4c20c9e185230dfade14bb61cc6 | [log] [tgz] |
---|---|---|
author | Hao Zhu <haozhu233@gmail.com> | Sun May 13 13:07:18 2018 -0400 |
committer | Hao Zhu <haozhu233@gmail.com> | Sun May 13 13:07:18 2018 -0400 |
tree | e9592e1a4b7ad6e86783445b4124705349205912 | |
parent | a2cb231d1def6457e0542506dda94d6392446e87 [diff] [blame] |
Fix a potential bug in column/row spec
diff --git a/R/row_spec.R b/R/row_spec.R index 76d7fbd..47832eb 100644 --- a/R/row_spec.R +++ b/R/row_spec.R
@@ -122,6 +122,9 @@ xml_cell_style <- function(x, bold, italic, monospace, underline, strikeout, color, background, align, font_size, angle, extra_css) { + if (is.na(xml_attr(x, "style"))) { + xml_attr(x, "style") <- "" + } if (bold) { xml_attr(x, "style") <- paste0(xml_attr(x, "style"), "font-weight: bold;")