bitwalker / bitwalker/toml-elixir

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

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
206
Forks
32
PR merge metrics
No merged PRs in 30d

Description

An example:

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

is parsed as:

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

However, adding another `outer` table:

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

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

will produce this:

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

Or, adding another nested inline table:

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

produces:

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

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.