Skip to content

Commit

Permalink
Fix Layout/MultilineHashKeyLineBreaks violations
Browse files Browse the repository at this point in the history
  • Loading branch information
pointlessone committed Oct 21, 2020
1 parent 4815df5 commit e9339f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions lib/prawn/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,10 @@ def apply_margin_options(options)

# Treat :margin as CSS shorthand with 1-4 values.
positions = {
4 => [0, 1, 2, 3], 3 => [0, 1, 2, 1],
2 => [0, 1, 0, 1], 1 => [0, 0, 0, 0],
4 => [0, 1, 2, 3],
3 => [0, 1, 2, 1],
2 => [0, 1, 0, 1],
1 => [0, 0, 0, 0],
0 => []
}[margin.length]

Expand Down
3 changes: 2 additions & 1 deletion manual/text/formatted_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
{ 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
Expand Down
3 changes: 2 additions & 1 deletion spec/prawn/text/formatted/box_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
texts = [{
text: 'Noua Delineatio Geographica generalis | Apostolicarum ' \
'peregrinationum | S FRANCISCI XAUERII | Indiarum & Iaponiæ Apostoli',
font: 'Courier', size: 10
font: 'Courier',
size: 10
}]
text_box = described_class.new(
texts,
Expand Down
8 changes: 4 additions & 4 deletions spec/prawn_manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
'0991412856bb7eb030d53d2e0ed5b3044c42d00db612c330a58ca233dc79d15e'\
'63852257984af2bd17223a92a210e84c1ee46d18abc65ce64356fe0bd90b05e9'
'1122056c91163df082ffd5d4950ce1c66ca30f49642c065fe44c57d20370750a'\
'26fc3992a49fa3436dece1e1994b49fbdff4424837e34a7e412b18381abb0353'
when 'jruby'
'0991412856bb7eb030d53d2e0ed5b3044c42d00db612c330a58ca233dc79d15e'\
'63852257984af2bd17223a92a210e84c1ee46d18abc65ce64356fe0bd90b05e9'
'1122056c91163df082ffd5d4950ce1c66ca30f49642c065fe44c57d20370750a'\
'26fc3992a49fa3436dece1e1994b49fbdff4424837e34a7e412b18381abb0353'
end

RSpec.describe Prawn do
Expand Down

0 comments on commit e9339f9

Please sign in to comment.