-
Notifications
You must be signed in to change notification settings - Fork 83
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
ColorConsoleAnnotator causing lines to be merged when used with LineNumber plugin #251
Labels
Comments
I have the same issue now in November 2023 on Ubuntu 23.10. Would be nice if it could be addressed. |
@PenelopeFudd in case you are still struggling with this issue, I found out that you can prevent it from happening by adding a trailing space at the end of the line, e.g. function fancy_echo() {
printf "\033[95m%s\033[0m \n" "$*" >&2
# ^ prevent merging lines by ansicolor-plugin
}
fancy_echo Hello world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Controller: Ubuntu 18.04
Agents: Ubuntu 18.04 in Docker
Reproduction steps
ansiColor('xterm')
that runs an Ansible script, with the LineNumber plugin installed.Expected Results
I expect to see line numbers and colored text, one line number per line.
Actual Results
Some lines (the output lines for each Ansible task) are concatenated together. In this screenshot, line 13822 is shown appended to 13821, but there are several more lines appended, stretching off the edge of the page:
Here is the plain-text version of the same output (ESC characters not shown):
Here is the html that's being generated (from a different console log file; sorry):
It looks like the code that hides the escape sequences is being thrown off by the addition of line numbers, and ends up hiding the
</span></p>
that follows the escape sequence being hidden. It only seems to happen with escape sequences at the end of a line, possibly justESC [ 0m
, but that's not proven.I'd guess the bug might be in ColorConsoleAnnotator.java around line 138 (the hideIfNeeded function):
Hope that helps!
Anything else?
The output in the BlueOcean console does not exhibit the concatenation problem.
The text was updated successfully, but these errors were encountered: