Commit c4fb48bbcdb03c88689c0f0318272f5f5c0e3a09
1 parent
beb98097
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
comment_paragraph: minor fixes
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
plugins/comment_paragraph/lib/comment_paragraph_plugin.rb
... | ... | @@ -52,8 +52,8 @@ class CommentParagraphPlugin < Noosfero::Plugin |
52 | 52 | paragraph_id = 0 |
53 | 53 | |
54 | 54 | doc = Hpricot(@article.body) |
55 | - paragraphs = doc.search("/[\r\n]").each do |paragraph| | |
56 | - parsed_paragraphs << (paragraph.to_html =~ /(.*)paragraph_comment_spacer(.*)|<div(.*)paragraph_comment(.*)/ ? paragraph.to_html : CommentParagraphPlugin.parse_paragraph(paragraph.to_html, paragraph_id)) | |
55 | + paragraphs = doc.search("/*").each do |paragraph| | |
56 | + parsed_paragraphs << (paragraph.to_html =~ /^\n|\r\n|<p>\W<\/p>$|(.*)paragraph_comment_spacer(.*)|<div(.*)paragraph_comment(.*)$/ ? paragraph.to_html : CommentParagraphPlugin.parse_paragraph(paragraph.to_html, paragraph_id)) | |
57 | 57 | paragraph_id += 1 |
58 | 58 | end |
59 | 59 | |
... | ... | @@ -75,7 +75,7 @@ class CommentParagraphPlugin < Noosfero::Plugin |
75 | 75 | "<div class='macro article_comments paragraph_comment' " + |
76 | 76 | "data-macro='comment_paragraph_plugin/allow_comment' " + |
77 | 77 | "data-macro-paragraph_id='#{paragraph_id}'>#{paragraph_content}</div>\r\n" + |
78 | - "<p class='paragraph_comment_spacer'></p>\r\n" | |
78 | + "<p class='paragraph_comment_spacer'> </p>\r\n" | |
79 | 79 | end |
80 | 80 | |
81 | 81 | end | ... | ... |