Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-24 04:38:30 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-24 05:59:07 +0300
commitcdec9e472db581acbee72cdcaa703e4155cb4cfb (patch)
tree4ffea09db574c2fab93373abdc398137df40a192 /lib
parent46de0366b1cc50e67747a457810a54e679bec151 (diff)
Replace \n to <br>
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/ansi2html.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ci/ansi2html.rb b/lib/ci/ansi2html.rb
index c628257e3f4..229050151d3 100644
--- a/lib/ci/ansi2html.rb
+++ b/lib/ci/ansi2html.rb
@@ -90,7 +90,7 @@ module Ci
def convert(raw, new_state)
reset_state
- restore_state(raw, new_state) if new_state
+ restore_state(raw, new_state) if new_state.present?
start = @offset
ansi = raw[@offset..-1]
@@ -105,6 +105,8 @@ module Ci
break
elsif s.scan(/</)
@out << '&lt;'
+ elsif s.scan(/\n/)
+ @out << '<br>'
else
@out << s.scan(/./m)
end