Fix add newline on blank line
This commit is contained in:
parent
69693d0a37
commit
d90f1b86b8
1 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ module RichTextTargetBlank
|
||||||
|
|
||||||
# Define the before_save callback to modify the links
|
# Define the before_save callback to modify the links
|
||||||
before_save do
|
before_save do
|
||||||
|
next # FIXME: This adds additional newlines for each blank line.
|
||||||
|
|
||||||
rich_text_attribute = send(name)
|
rich_text_attribute = send(name)
|
||||||
if rich_text_attribute.present?
|
if rich_text_attribute.present?
|
||||||
doc = Nokogiri::HTML::DocumentFragment.parse(rich_text_attribute.body.to_html)
|
doc = Nokogiri::HTML::DocumentFragment.parse(rich_text_attribute.body.to_html)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue