summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorrandym <[email protected]>2018-02-07 11:21:00 +0900
committerrandym <[email protected]>2018-02-07 11:21:00 +0900
commit3f34514ecf53fb4a3401b5336833bbeb439efe2a (patch)
tree5a911a498db05f87756313e6d737e866dd37d176 /lib
parent14c05d69ddf555528bb20991d289454d5350969c (diff)
parent545d77371cf81c368ccfd761e5409cbc7e141711 (diff)
downloadcaxlsx-3f34514ecf53fb4a3401b5336833bbeb439efe2a.tar.gz
caxlsx-3f34514ecf53fb4a3401b5336833bbeb439efe2a.zip
Merge branch 'master' into release-3.0.0
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx.rb8
-rw-r--r--lib/axlsx/stylesheet/styles.rb2
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index 387a8b89..23fc6c8b 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -135,8 +135,12 @@ module Axlsx
# @param [String] str The string to process
# @return [String]
def self.sanitize(str)
- str.delete!(CONTROL_CHARS)
- str
+ if str.frozen?
+ str.delete(CONTROL_CHARS)
+ else
+ str.delete!(CONTROL_CHARS)
+ str
+ end
end
# If value is boolean return 1 or 0
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb
index c7283324..2460ab10 100644
--- a/lib/axlsx/stylesheet/styles.rb
+++ b/lib/axlsx/stylesheet/styles.rb
@@ -128,7 +128,7 @@ module Axlsx
# @option options [Boolean] i Indicates if the text should be italicised
# @option options [Boolean] u Indicates if the text should be underlined
# @option options [Boolean] strike Indicates if the text should be rendered with a strikethrough
- # @option options [Boolean] strike Indicates if the text should be rendered with a shadow
+ # @option options [Boolean] shadow Indicates if the text should be rendered with a shadow
# @option options [Integer] charset The character set to use.
# @option options [Integer] family The font family to use.
# @option options [String] font_name The name of the font to use