We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 885cecc commit 34b0adcCopy full SHA for 34b0adc
lib/prawn/markup/processor/blocks.rb
@@ -63,16 +63,11 @@ def append_new_line
63
def add_paragraph
64
text = dump_text
65
text.gsub!(/[^\n]/, '') if text.strip.empty?
66
+ return if text.empty? && !treat_empty_paragraph_as_new_line?
67
- if !text.empty?
68
- add_bottom_margin
69
- add_formatted_text(text, text_options)
70
- put_bottom_margin(text_margin_bottom)
71
- elsif text.empty? && treat_empty_paragraph_as_new_line?
72
73
- append_text("\n")
74
75
- end
+ add_bottom_margin
+ add_formatted_text(text.empty? ? "\n" : text, text_options)
+ put_bottom_margin(text_margin_bottom)
76
end
77
78
def add_current_text(options = text_options)
0 commit comments