File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ AllCops:
1616 NewCops : enable
1717
1818Lint/UnusedMethodArgument :
19- Exclude :
20- - lib/prawn_html/utils.rb
19+ Enabled : false
2120
2221Naming/FileName :
2322 Exclude :
Original file line number Diff line number Diff line change @@ -94,14 +94,14 @@ def render_if_needed(element)
9494 end
9595
9696 def apply_tag_close_styles ( element )
97- tag_styles = element . tag_closing
97+ tag_styles = element . tag_closing ( pdf : pdf , context : context )
9898 @last_margin = tag_styles [ :margin_bottom ] . to_f
9999 pdf . advance_cursor ( last_margin + tag_styles [ :padding_bottom ] . to_f )
100100 pdf . start_new_page if tag_styles [ :break_after ]
101101 end
102102
103103 def apply_tag_open_styles ( element )
104- tag_styles = element . tag_opening
104+ tag_styles = element . tag_opening ( pdf : pdf , context : context )
105105 move_down = ( tag_styles [ :margin_top ] . to_f - last_margin ) + tag_styles [ :padding_top ] . to_f
106106 pdf . advance_cursor ( move_down ) if move_down > 0
107107 pdf . start_new_page if tag_styles [ :break_before ]
Original file line number Diff line number Diff line change @@ -56,14 +56,14 @@ def process_styles(element_styles: nil)
5656 # Styles to apply on tag closing
5757 #
5858 # @return [Hash] hash of styles to apply
59- def tag_closing
59+ def tag_closing ( pdf : nil , context : nil )
6060 styles . slice ( *Attributes ::STYLES_APPLY [ :tag_close ] )
6161 end
6262
6363 # Styles to apply on tag opening
6464 #
6565 # @return [Hash] hash of styles to apply
66- def tag_opening
66+ def tag_opening ( pdf : nil , context : nil )
6767 styles . slice ( *Attributes ::STYLES_APPLY [ :tag_open ] )
6868 end
6969
You can’t perform that action at this time.
0 commit comments