Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jerry118118 opened this issue Jul 30, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jerry118118
Copy link

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 :(

@ericzbeard ericzbeard added enhancement New feature or request good first issue Good for newcomers labels Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants