Skip to content

chore: ensure consistent line endings#659

Merged
olizilla merged 2 commits intorevampfrom
chore/revamp/line-endings
May 18, 2018
Merged

chore: ensure consistent line endings#659
olizilla merged 2 commits intorevampfrom
chore/revamp/line-endings

Conversation

@olizilla
Copy link
Copy Markdown
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
Comment thread .editorconfig Outdated
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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