-
Notifications
You must be signed in to change notification settings - Fork 24
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
Clarify whitespace handling #46
base: master
Are you sure you want to change the base?
Conversation
Change single-backticks to double-backticks as required by rst.
Previously, the rule for blank lines technically did not cover empty lines. Clarify that blank lines are lines that are empty after any leading whitespace is removed. Also clarify that the trailing line separator (if any) is ignored.
Make the spec conform to existing test `spaces_after_section_name`. Fixes editorconfig/editorconfig#500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one question, otherwise LTGM
|
||
- Blank: contains only whitespace characters. | ||
- Blank: contains nothing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
- Blank: contains nothing. | |
- Blank: contains nothing or only whitespace characters. |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I scratched my head a bit about that as well. The line just before the bullets says "once leading whitespace is removed", so there would be nothing left. I thought that was cleaner than adding "may contain leading whitespace" to each bullet.
How about moving blanks out of the bullets? Something like:
+When reading an EditorConfig file, the following are ignored:
+ - blank lines (empty, or nothing but whitespace)
+ - all beginning whitespace on each line.
+Each non-blank line must be one of the following, once leading whitespace is removed
+(and ignoring any trailing line separator):
- - Blank: contains only whitespace characters
- Comment: ...
Any news here? :-) |
@cxw42 thanks for opening this - i got a question, so this to clarify that all empty lines (using only invisible characters) are ignored and all other lines should be interpreted after trimming (removing all invisible characters)? I am asking this because i was confused if that is meant with "once leading whitespace is removed (and ignoring any trailing line separator". |
I'd say the only meaning changes here are, that blank lines may be empty when before they needed to have any whitespace, except if you consider the line separator part of the line. In the latter case I'd say all here is just using clearer words without semantic changes |
Thanks @Vampire - i'm no native speaker so i wonder if the whole description is just difficult paraphrase of
|
Fixes editorconfig/editorconfig#500