Skip to content

Fix Nested path lookup bug#651

Merged
sunng87 merged 2 commits into
sunng87:masterfrom
cmrschwarz:nested_path_lookup
Jun 18, 2024
Merged

Fix Nested path lookup bug#651
sunng87 merged 2 commits into
sunng87:masterfrom
cmrschwarz:nested_path_lookup

Conversation

@cmrschwarz

Copy link
Copy Markdown
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
Copy Markdown

Coverage Status

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

@sunng87

sunng87 commented Jun 18, 2024

Copy link
Copy Markdown
Owner

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
@cmrschwarz

cmrschwarz commented Jun 18, 2024

Copy link
Copy Markdown
Contributor Author

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

sunng87 commented Jun 18, 2024

Copy link
Copy Markdown
Owner

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.

3 participants