diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx.rb | 8 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 2 |
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 |
