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

Inline tables nested inside arrays of tables sometimes are not associated with their key #37

Open
Lakret opened this issue Dec 29, 2023 · 1 comment

Comments

@Lakret
Copy link

Lakret commented Dec 29, 2023

An example:

[[outer]]
inner = { foo = "bar" }

is parsed as:

%{"outer" => [%{"foo" => "bar"}]}

However, adding another outer table:

[[outer]]
inner = { foo = "bar" }

[[outer]]
inner = { foo = "baz" }

will produce this:

%{
    "outer" => [
        %{"foo" => "bar"}, 
        %{"inner" => %{"foo" => "baz"}}
    ]
}

Or, adding another nested inline table:

[[outer]]
inner = { foo = "bar" }
inner2 = { count = 5 }

produces:

%{
    "outer" => [
        %{
            "foo" => "bar", 
            "inner2" => %{"count" => 5}
         }
    ]
}

I'm open to help with fixing it, but will need some pointers where to look :)

@jvantuyl
Copy link

I think I may have fixed this inadvertently with #41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants