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

Backslash/semicolon/octothorpe escaping #5

Closed
xuhdev opened this issue Apr 23, 2019 · 7 comments
Closed

Backslash/semicolon/octothorpe escaping #5

xuhdev opened this issue Apr 23, 2019 · 7 comments

Comments

@xuhdev
Copy link
Member

xuhdev commented Apr 23, 2019

In property values (outside globs inside brackets), should we add backslash/semicolon/octothorpe escaping into EditorConfig specification? Please vote by commenting below: yes or no only. Voting will be closed at the end of May 6.

Related/discussion issue editorconfig/editorconfig-core-test#24

@editorconfig/board-member cc @rakus

@jednano
Copy link
Member

jednano commented Apr 23, 2019

yes

@florianb
Copy link
Member

florianb commented Apr 24, 2019

I stay neutral on this for two reasons:

  1. I'd like to vote "no" because i think the problem is we didn't explicitly specify yet how custom properties may be used with the editorconfig. And we didn't specify explicitly the editorconfig-fileformat, ini files itself aren't specified and the behavior of the reference parser (ConfigParser) depends on modal parameters. But i don't want to stay in the way of @rakus implementation.

  2. I'd also like to vote yes, since we become a little more explicit about the handling of values. But i also think the escaping of octothorpes, semicolons and backslashes is by far not enough to allow a secure and complete serialization of valid UTF-8 strings.

I'd enjoy to see if this could lead to a discussion how a ini-file is formally defined and how people may safely add custom properties.

@ppalaga
Copy link

ppalaga commented Apr 24, 2019

yes

@sindresorhus
Copy link
Member

no

Because I rather see it done properly by defining a formal grammar instead of just a quick fix.

@rakus
Copy link

rakus commented Apr 24, 2019

On one hand I think the vote is to early, on the other hand it might be the spark to start the discussion about a formally defined file format.

I personally I tend to vote "No" as I think that the file format should be as simple as possible.

Anyway, I agree with @sindresorhus and @florianb: We need a strong formal specification and I'm willing to contribute.

PS: I'm not implementing something new, I just implemented a Vim editorconfig plugin. While implementing I missed a formal specification.

@Mpdreamz
Copy link
Member

no,

I too would like a more in depth spec including learning what INI does here.
Would also like to learn how common the case is and whether we can simply mandate comments being only available when on a line of their own.

@xuhdev
Copy link
Member Author

xuhdev commented May 9, 2019

The conclusion is no. Closed

@xuhdev xuhdev closed this as completed May 9, 2019
@editorconfig editorconfig locked as resolved and limited conversation to collaborators May 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants