Skip to content

Commit

Permalink
Fix line endings and replace new lines with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jan 12, 2024
1 parent 3653954 commit e486e78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ def awesome_description
d.gsub!(/stackoverflow/i, 'Stack Overflow')
# Nodejs should be Node.js
d.gsub!(/Nodejs/i, 'Node.js')
# remove mixed line endings
d.gsub!(/\r\n?/, "\n")
# remove all new lines
d.gsub!(/\n/, ' ')
# remove all carriage returns
d.gsub!(/\r/, ' ')
d
end

Expand Down

0 comments on commit e486e78

Please sign in to comment.