manual/text/formatted_text.rb in prawn-2.2.2 vs manual/text/formatted_text.rb in prawn-2.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# There are two other text methods available: <code>formatted_text</code> and
# <code>formatted_text_box</code>.
#
# These are useful when the provided text has numerous portions that need to be
# formatted differently. As you might imply from their names the first should
@@ -23,10 +25,10 @@
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::ManualBuilder::Example.generate(filename) do
formatted_text [
{ text: 'Some bold. ', styles: [:bold] },
{ text: 'Some italic. ', styles: [:italic] },
- { text: 'Bold italic. ', styles: [:bold, :italic] },
+ { text: 'Bold italic. ', styles: %i[bold italic] },
{ text: 'Bigger Text. ', size: 20 },
{ text: 'More spacing. ', character_spacing: 3 },
{ text: 'Different Font. ', font: 'Courier' },
{ text: 'Some coloring. ', color: 'FF00FF' },
{