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

Fix Nested path lookup bug #651

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

cmrschwarz
Copy link
Contributor

Fixes a simple bug in path lookup.

Testcase

(input: {"foo": [42], "bar": [1,2,3]})

let input = r#"
{{#each bar as |x|}}
{{#each ../foo as |y|}}
{{../../foo.0}}: {{../x}}
{{/each}}
{{/each}}
"#;

Output Before

42: 
42: 
42: 

Output After

42: 1
42: 2
42: 3

@coveralls
Copy link

Coverage Status

coverage: 81.561%. remained the same
when pulling fdf03e1 on cmrschwarz:nested_path_lookup
into 1703e20 on sunng87:master.

@sunng87
Copy link
Owner

sunng87 commented Jun 18, 2024

LGTM. Thank you!

I'm curious that did you find this in your scenario or using some test suites?

@sunng87 sunng87 merged commit 724b646 into sunng87:master Jun 18, 2024
9 checks passed
@cmrschwarz
Copy link
Contributor Author

cmrschwarz commented Jun 18, 2024

LGTM. Thank you!

I'm curious that did you find this in your scenario or using some test suites?

I'm working on a real usecase were I'm creating an interactive debug log/display for a rather complex data processing tool.
All the fixes that I'm PR'ing are just stuff that I run across while developing that tool.
I would like to avoid maintaining a fork of this project, so this is just open source working as intended 😆.
That process is nearing it's completion now, but I still have a few things on my personal branch. I hope to manage to PR these over the week / weekend. Maybe I can find a good solution for the if indentation thing (#650) too, have you looked at that a bit?

@sunng87
Copy link
Owner

sunng87 commented Jun 18, 2024

Thank you! I haven't got enough time to look into the if indent fix. Any issue with indent requires me to switch my context and deep dive into it :)

I will take a look in this weekend.

@cmrschwarz cmrschwarz deleted the nested_path_lookup branch July 13, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants