Comments (8)
As reference, the Python configparser
explicitly allows spaces in keys.
Our current definition of an experimental Ini grammar also allows keys containing whitespaces.
I agree, this should be more explicit, the tests should be aligned.
from specification.
The original issue was all about clarifying this use case, however I'm in doubt if this would not require opening a vote. I'm more into opening a vote, even tho this behavior already adopted anywhere (as stated by @florianb in #39 (comment)), because embracing silently adopted features is never a good idea, especially when potential roll-back may affect a large audience. Yes, it seems like spaces in key are not prohibited, but at least some parser developers had a doubt - so right now ones are embracing it, others are not (and probably not without a reason). Assuming that you're members of editorconfig org, I'm surely leaving this up to you, but I think opening a vote may shed a light on potential problems of this use-case
from specification.
What we have in the spec right now:
- leading whitespace before a property is ignored.
- trailing whitespace after a property is ignored.
What we are missing: Do we allow whitespace in the middle of a property?
Based on a literal reading of the current spec:
Key: the part before the first = (trimmed of whitespace).
Whitespace within a property name isn't forbidden. In addition, since we allow non-ASCII characters, I don't see a reason that someone would have considered whitespace forbidden. Note in this case, whitespace is no different from any other characters.
In my opinion, what we should do is to clarify this point in the spec and add a test, and not consider this as a change (instead of clarification) in the standard. What do you think?
from specification.
I'm introducing @ppalaga to this conversation as following actions in solving issue chain depends on him (regardless of the resolution of this issue), and setting up these kind of standards may need a fresh look from direct implementers
from specification.
Do you think it's worth a vote for editorconfig/editorconfig-vote? This is a pretty corner case: Is it a decision on changing the standard, or a lack of clarity in the document?
from specification.
@xuhdev i didn't check how the reference implementation behaves (hadn't the time, sorry) so in the case this might break things i'd vote for a vote.
A pragmatic approach would be to align the spec and check the reference implementation: this use case is definitely aside of the use of EditorConfig and even in the wild undefined behaviour.
I also can't think of a case this might break things since there should be "only" the case a parser does not accept whitespaces which is unlikely.
Then there is only the handling of preceeding or trailing whitespaces of the keys but this is already handled by the standard.
from specification.
Is there any agreement? If so, feel free to close the issue with resolution status and I'll pass it back to ec4j
devs
from specification.
See #43 for a fix in the spec
from specification.
Related Issues (20)
- How is this going to work? HOT 11
- Versioning with SemVer HOT 2
- Introduce AST + validation errors HOT 21
- Clarification on insert_final_newline behavior for empty files HOT 3
- Clarify the behavior of leading slash in section title HOT 2
- Clarify behavior of trim_trailing_whitespace HOT 6
- Clarify behavior of ; and # within values HOT 14
- max_line_length is not specified HOT 15
- Readthedocs link mentioned in README.md not available HOT 4
- [Title]
- Tell IDE to ignore files HOT 3
- Odd grammatical syntax at supported-properties/root HOT 1
- Use editorconfig.org subdomain HOT 3
- How to have a multiline value HOT 2
- Table of Content HOT 6
- version tags? HOT 1
- Clarify glob matching HOT 7
- Enhancement: Light comment style preference HOT 2
- Clarify behavior of formatting (non-"root") properties at top level HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from specification.