Skip to content

Commit

Permalink
encoder_lua: Improve Tag handling robustness
Browse files Browse the repository at this point in the history
Using the method call seems more reliable in case the input parser
forgets to set the tag.
  • Loading branch information
Zash committed Oct 4, 2023
1 parent 3109db3 commit c605d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/yqlib/encoder_lua.go
Expand Up @@ -270,7 +270,7 @@ func (le *luaEncoder) encodeAny(writer io.Writer, node *yaml.Node) error {
case yaml.MappingNode:
return le.encodeMap(writer, node, false)
case yaml.ScalarNode:
switch node.Tag {
switch node.ShortTag() {
case "!!str":
return le.encodeString(writer, node)
case "!!null":
Expand Down

0 comments on commit c605d37

Please sign in to comment.