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

(toml) Add support for TOML arrays #2063

Closed
marcinx opened this issue Jun 27, 2019 · 2 comments · Fixed by #2335
Closed

(toml) Add support for TOML arrays #2063

marcinx opened this issue Jun 27, 2019 · 2 comments · Fixed by #2335
Labels
enhancement An enhancement or new feature good first issue Should be easier for first time contributors help welcome Could use help from community

Comments

@marcinx
Copy link

marcinx commented Jun 27, 2019

Hi Team,

TOML currently handles this case correctly

moo=["foo"]

but highlighting is not applied when multiple values are present in the array, e.g.

KNOWN_PEERS = [
    "finland.some-host.com:11625",
    "germany.some-host.com:11625",
    "hongkong.some-host.com:11625",
]

Thanks for your help!

@joshgoebel
Copy link
Member

joshgoebel commented Oct 6, 2019

Example:

https://jsfiddle.net/fx6byraw/1/

The problem is we don't support arrays at all.. and we assume values must be on a single line... so we realize that you have a string (we know nothing about the array), but the rest is not because at the end of the line we have no idea what the rest of that content it.

If you moved it all to one line you'd see the strings all colorize I believe, of course we still wouldn't know anything about arrays. :)

Someone wanting to tackle this would need to add REAL array support to ini to detect array elements, etc... this would start to feel a lot like the JSON parser. Right now the "value" parsing part of ini is not that clever.

At that point it might make sense to split out ini from TOML though (not sure).

@joshgoebel joshgoebel added the enhancement An enhancement or new feature label Oct 7, 2019
@joshgoebel joshgoebel changed the title Add multiline TOML arrays Add support for TOML arrays Oct 7, 2019
@joshgoebel joshgoebel added help welcome Could use help from community good first issue Should be easier for first time contributors labels Oct 7, 2019
@joshgoebel
Copy link
Member

Could be beginner friendly. You'd learn a lot by looking at the JSON grammar as an example.

@joshgoebel joshgoebel changed the title Add support for TOML arrays (toml) Add support for TOML arrays Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature good first issue Should be easier for first time contributors help welcome Could use help from community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants