New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #22209 - Render empty lines properly in output #380
Conversation
For some reason the output uses CRLF to mark a newline, writing CRs into the terminal window led to line numbers not matching the lines. Also we were splitting the output on newlines and trailing empty fields were omitted.
This still doesn't work fully for ansible and it is related to the output colorization code. WIP |
There was an issue when line had color information but was otherwise empty. Also multiple consecutive spaces were removed by the browser due to missing css property.
@@ -1,4 +1,5 @@ | |||
module JobInvocationOutputHelper | |||
COLOR_PATTERN = /\e\[.*?m/.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
color = seq[/(\d+)m/,1] | ||
"{{{format color:#{color}}}}" | ||
end | ||
|
||
current_color = 'default' | ||
out = %{<span style="color: #{@current_color}">} | ||
out = %{<span style="color: #{current_color}">} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the issue now, that the colorization doesn't survive the the new line?
rhlogo.zip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works well. Waiting for Jenkins
Test failures don't seem to be related |
Test failures unrelated. Thanks @adamruzicka |
For some reason the output uses CRLF to mark a newline, writing CRs into
the terminal window led to line numbers not matching the lines. Also we
were splitting the output on newlines and trailing empty fields were
omitted.
To reproduce run the following