diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-05-25 14:51:20 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-05-25 16:00:03 +0300 |
commit | 820c1c3abc80570e7d87a442670df4c8305c267b (patch) | |
tree | cb486647f821d54ff40a86e9db14fb2ad9056235 /lib | |
parent | 4e8798eef0076ee9486f61ad14094c68334c45d1 (diff) |
Merge branch 'incremental-fixes' into 'master'
Fix concurrent request when updating build log in browser
If you have a slow internet connection the trace will not be updated correctly. We need to check if our request is the latest one.
Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/17535
See merge request !4183
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/ansi2html.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ci/ansi2html.rb b/lib/ci/ansi2html.rb index 5fed43aaebd..2f817c13ac4 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 << '<' + elsif s.scan(/\n/) + @out << '<br>' else @out << s.scan(/./m) end |