Repository navigation
Commit e23a254
fix: avoid duplicate table header when adding a key to an out-of-order table (#545)
Adding a plain key to an out-of-order table whose concrete `[x]` part is
declared after its sub-tables (the "defining a super-table afterward is ok"
spec form) wrote the value into the header-less super part, forcing it to
render a second `[x]` header next to the existing concrete one. The dumped
output then had a duplicate header and no longer parsed.
Route the value into the existing concrete (non-super) part instead, so the
header that already exists gains the key and no second header is emitted.
Co-authored-by: Frost Ming <[email protected]>1 parent 34e51e2 commit e23a254
3 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
646 | 660 | | |
647 | 661 | | |
648 | 662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1178 | 1189 | | |
1179 | 1190 | | |
1180 | 1191 | | |
| |||
0 commit comments