diff --git a/lib/prawn/text.rb b/lib/prawn/text.rb index 49097f42f..1c323a781 100644 --- a/lib/prawn/text.rb +++ b/lib/prawn/text.rb @@ -159,7 +159,7 @@ def text(string, options = {}) if p p = [] unless p.is_a?(Array) options.delete(:inline_format) - array = text_formatter.format(string, *p) + array = string.is_a?(Array) ? string : text_formatter.format(string, *p) else array = [{ text: string }] end diff --git a/lib/prawn/text/box.rb b/lib/prawn/text/box.rb index 63de01a26..2d64d8a55 100644 --- a/lib/prawn/text/box.rb +++ b/lib/prawn/text/box.rb @@ -111,7 +111,7 @@ def text_box(string, options = {}) if options[:inline_format] p = options.delete(:inline_format) p = [] unless p.is_a?(Array) - array = text_formatter.format(string, *p) + array = string.is_a?(Array) ? string : text_formatter.format(string, *p) Text::Formatted::Box.new(array, options) else Text::Box.new(string, options)