manual/text/formatted_text.rb in prawn-2.3.0 vs manual/text/formatted_text.rb in prawn-2.4.0
- old
+ new
@@ -22,11 +22,11 @@
require_relative '../example_helper'
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::ManualBuilder::Example.generate(filename) do
- formatted_text [
+ formatted_text([
{ text: 'Some bold. ', styles: [:bold] },
{ text: 'Some italic. ', styles: [:italic] },
{ text: 'Bold italic. ', styles: %i[bold italic] },
{ text: 'Bigger Text. ', size: 20 },
{ text: 'More spacing. ', character_spacing: 3 },
@@ -40,19 +40,22 @@
{
text: 'Link to a local file. ',
color: '0000FF',
local: './local_file.txt'
}
- ]
+ ])
formatted_text_box(
[
{ text: 'Just your regular' },
{ text: ' text_box ', font: 'Courier' },
{
text: 'with some additional formatting options added to the mix.',
- color: [50, 100, 0, 0], styles: [:italic]
+ color: [50, 100, 0, 0],
+ styles: [:italic]
}
],
- at: [100, 100], width: 200, height: 100
+ at: [100, 100],
+ width: 200,
+ height: 100
)
end