Skip to content

PrettyPrinter removes newlines #75

Open
@mbeckerle

Description

@mbeckerle

Migrated from https://issues.scala-lang.org/browse/SI-4543.

There is discussion there that is not reproduced here.

Original description is:

What steps will reproduce the problem (please be specific and

scala> <foo>{PCData("hello\nworld")}</foo>
res51: scala.xml.Elem =
<foo><![CDATA[hello
world]]></foo>

scala> (new PrettyPrinter(Int.MaxValue, 2)).format(res51)
res52: String = <foo><![CDATA[hello world]]></foo>

What is the expected behavior?

Should print "hello\nworld"

scala> (new PrettyPrinter(Int.MaxValue, 2)).format(res51)
res52: String = <foo><![CDATA[hello\nworld]]></foo>

What do you see instead?
prints "hello world"

What versions of the following are you using?
Scala: 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions