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

tpl/collections: Fix append when appending a slice to a slice of slices #11093

Closed
wants to merge 1 commit into from

Conversation

bep
Copy link
Member

@bep bep commented Jun 13, 2023

Fixes #11004

Copy link
Member

@jmooring jmooring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hugo v0.114.0-DEV-4d22ba2

This:

{{ $obj := slice (slice "a") }}
{{ $obj = $obj | append (slice "b") }}
{{ $obj = $obj | append (slice "c") }}

<pre>
{{ jsonify (dict "indent" "  ") $obj }}
</pre>

Still produces this:

[
  [
    "a"
  ],
  "b",
  [
    "c"
  ]
]

@bep
Copy link
Member Author

bep commented Jun 13, 2023

Hmm...

@bep
Copy link
Member Author

bep commented Jun 14, 2023

I'm going to take one more stab at this, but I need to start fresh.

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected result appending a slice to a slice of slices
2 participants