Skip to content

PromptLogger does not properly preserve ansi colors across newlines #3793

@lihaoyi

Description

@lihaoyi
def qux = Task{
  val str = """
Hello
World
    """
  pprint.log(str)
}
Screenshot 2024-10-21 at 5 30 09 PM

The basic issue is that the colored snippets in the line prefix are resetting the ansi colors before each line to fansi.Attrs.empty, when we should instead reset the ansi color to that of the end of the previous line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions