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

chore: ensure consistent line endings #659

Merged
merged 2 commits into from
May 18, 2018
Merged

Conversation

olizilla
Copy link
Member

Adds editorconfig to keep our editors ending lines with LF and .gitattributes to get git to ensure LF line endings when the editor doesn't.

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla olizilla requested review from hacdias and lidel May 18, 2018 09:43
.editorconfig Outdated
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this break Github-style markdown where you indicate a <br> via two spaces at the end of line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh my. i did not know that was a thing. I think github preserves newlines in markdown.
without
spaces
at
the
end
of
the
line
;-)

Copy link
Member

@lidel lidel May 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Github uses simplified end line rules for comments 🙃
But in things rendered from repo such as README.md you need to put a blank line for starting a new paragraph, otherwise it will be rendered as a single line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh whut. every day a school day when nothing is consistent.

I copied this config from js-ipfs, so that's an interesting find @lidel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidel i've added an override for markdown files

[*.md]
trim_trailing_whitespace = false

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla olizilla merged commit 7855301 into revamp May 18, 2018
@olizilla olizilla deleted the chore/revamp/line-endings branch May 18, 2018 13:45
@hacdias hacdias added the revamp label May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants