File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -714,13 +714,13 @@ def excerpt(comment)
714714 # Match from a capital letter to the first period, discarding any links, so
715715 # that we don't end up matching badges in the README
716716 first_paragraph_match = text . match ( ParagraphExcerptRegexp )
717- return text [ 0 ...150 ] . gsub ( / \n / , " " ) . squeeze ( " " ) unless first_paragraph_match
717+ return text [ 0 ...150 ] . tr_s ( " \n " , " " ) . squeeze ( " " ) unless first_paragraph_match
718718
719719 extracted_text = first_paragraph_match [ 0 ]
720720 second_paragraph = first_paragraph_match . post_match . match ( ParagraphExcerptRegexp )
721721 extracted_text << " " << second_paragraph [ 0 ] if second_paragraph
722722
723- extracted_text [ 0 ...150 ] . gsub ( / \n / , " " ) . squeeze ( " " )
723+ extracted_text [ 0 ...150 ] . tr_s ( " \n " , " " ) . squeeze ( " " )
724724 end
725725
726726 def generate_ancestor_list ( ancestors , klass )
You can’t perform that action at this time.
0 commit comments