Skip to content

please treat newlines as terminating a line instead of being a separator #2083

@obfusk

Description

@obfusk

Hi,

Ace currently treats newlines as separators, whereas the POSIX standard defines a line as A sequence of zero or more non- <newline> characters plus a terminating <newline> character.

Most UNIX editors (e.g. vim) adhere to this standard. Most unix utilities (like cat and the read builtin from bash) expect files to adhere to this standard. Unfortunately, ace treats newlines differently and both unexpectedly produces files with no newline at the end and displays files that do have a newline at the end as having an extra, empty, line at the end.

Given that some people may want to retain the existing behaviour and the fact that the new (IMHO correct) behaviour would not be backwards compatible (i.e. it breaks some of the current tests), I would suggest making the behaviour configurable.

Thanks.

- Felix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions