Skip to content

Platform dependent EOL behaviour of DomNode.asText() makes it hard to use #283

Description

@atnak

Summary

DomNode.asText() depends on HtmlSerializer which internally formats lines using the value of System.lineSeparator() as the line separator.

As an API interface, this behaviour of DomNode.asText() and HtmlSerializer.asText() may be ill-suited, since applications are required to take this into consideration any time they're working with values returned by these methods.

Moreover, I believe EOL style is a function of the output medium (be it a text file or an OS console) and perhaps not something that should be done in a library, this far from the presentation layer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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