Coder Social home page Coder Social logo

Comments (8)

florianb avatar florianb commented on June 23, 2024 2

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.

rosingrind avatar rosingrind commented on June 23, 2024 1

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.

xuhdev avatar xuhdev commented on June 23, 2024 1

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.

rosingrind avatar rosingrind commented on June 23, 2024

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.

xuhdev avatar xuhdev commented on June 23, 2024

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.

florianb avatar florianb commented on June 23, 2024

@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.

rosingrind avatar rosingrind commented on June 23, 2024

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.

xuhdev avatar xuhdev commented on June 23, 2024

See #43 for a fix in the spec

from specification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.