Skip to content

Commit 3cfde37

Browse files
shouyactran
authored andcommitted
Escape newline character in index expression (ctran#545)
1 parent 3c90753 commit 3cfde37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def index_columns_info(index)
374374
if index.try(:orders) && index.orders[col.to_s]
375375
"#{col} #{index.orders[col.to_s].upcase}"
376376
else
377-
col.to_s
377+
col.to_s.gsub("\r", '\r').gsub("\n", '\n')
378378
end
379379
end
380380
end

0 commit comments

Comments
 (0)