handle carriage return in newlines_to_br

This commit is contained in:
Unending
2021-01-16 18:49:01 +01:00
parent 3c499d0241
commit 3cae09b968
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ module Liquid
# Add <br /> tags in front of all newlines in input string
def newline_to_br(input)
input.to_s.gsub(/\n/, "<br />\n")
input.to_s.gsub(/\r?\n/, "<br />\n")
end
# Reformat a date using Ruby's core Time#strftime( string ) -> string