-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Make ini parser format same as other normal formats. #800
Comments
It's by design. Identifier accepts only Did you try to put the key between Also, you have the possibility to use the SMC format. |
So then it's gonna return "key" instead key, you know, but ini always parsing first token then = and then second one, it's ignore spaces between I used this one in ExtraMirror: |
You can always use Same for value, you can use |
Both INI and SMC format are parsed differently. I'm not sure to understand what you're talking about. If you want to use spaces in keys, surround them with |
It's also doesnt allow to parse key values without '=' token. |
Implementation can vary, but that's not the point. |
Yes it is, i already known about this solution when started PR. |
Great. That's not what you said here though: #800 (comment) I don't know if the suggestion actually makes sense, but it's noted. |
Yes, bug -> unexpected rule, which is not covered by original specification. |
The current spec for AMXX is available in the include: /**
* The INI file format is defined as:
* WHITESPACE: 0x20, \n, \t, \r
* IDENTIFIER: A-Z a-z 0-9 _ - , + . $ ? /
* STRING : Any set of symbols
*
* Basic syntax is comprised of SECTIONs.
* A SECTION is defined as:
* [SECTIONNAME]
* OPTION
* OPTION
* OPTION...
*
* SECTIONNAME is an IDENTIFIER.
* OPTION can be repeated any number of times, once per line.
* OPTION is defined as one of:
* KEY = "VALUE"
* KEY = VALUE
* KEY
* Where KEY is an IDENTIFIER and VALUE is a STRING.
*
* WHITESPACE should always be omitted.
* COMMENTS should be stripped, and are defined as text occurring in:
* ;<TEXT>
*
* Example file below. Note that the second line is technically invalid.
* The event handler must decide whether this should be allowed.
* --FILE BELOW--
* [gaben]
* hi = clams
* bye = "NO CLAMS"
*
* [valve]
* cannot
* maintain
* products
*/ The current behavior is expected. Could you show me the "original" specification? (not the wiki) |
https://github.com/compuphase/minIni Here's no original spec, idk how i should rename PR. |
I hear you. There is no need to generalize and dramatize everything, it's not helping. Implementation varies and I'm not against supporting spaces in keys "officially". Documentation is indeed unclear about the quote around the key. It's likely unintended behavior.
I don't have a strong preference.
|
I think we should make some breaking changes in 1.10, or create 1.11 instead. So what do you think? #798
It's not random, i used this repos in past. |
Description
Now seems like it's using
space
as strtok valueProblematic Code (or Steps to Reproduce)
The text was updated successfully, but these errors were encountered: