Skip to content

Rain fmt handles windows linebreak CR LF differently with unix linebreak LF #479

Open
@jerry118118

Description

@jerry118118

Rain fmt will separate multi line comments with windows return CR LF with new lines.

For example, if the comment lines below are separated by windows linebreak CR LF,

AWSTemplateFormatVersion: 2010-09-09

# Comment line 1
# Comment line 2
# Comment line 3

Description: Hello World

after running rain fmt, it will generate new lines between my comment.

AWSTemplateFormatVersion: "2010-09-09"

# Comment line 1


# Comment line 2


# Comment line 3
Description: Hello World

But if the comment lines are separated by unix linebreak LF, it will not add new lines into my comments.

AWSTemplateFormatVersion: "2010-09-09"

# Comment line 1
# Comment line 2
# Comment line 3
Description: Hello World

Is that expected behavior? As I am developing cloudformation template mostly through windows, and most of my files are created using windows. Rain fmt will break all my multi line comments :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions