mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 08:35:42 +00:00
Add note about how Lua nil is unsuitable as table key
Could add some context tracking in the future to allow rejecting nil in a table key context.
This commit is contained in:
parent
5b7c00aa62
commit
f544580692
@ -175,6 +175,7 @@ func (le *luaEncoder) encodeAny(writer io.Writer, node *yaml.Node) error {
|
||||
case "!!str":
|
||||
return le.encodeString(writer, node)
|
||||
case "!!null":
|
||||
// TODO reject invalid use as a table key
|
||||
return writeString(writer, "nil")
|
||||
case "!!bool":
|
||||
// Yaml 1.2 has case variation e.g. True, FALSE etc but Lua only has
|
||||
|
||||
Loading…
Reference in New Issue
Block a user