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 the use of a multi-level object key (e.g. foo.bar) as the key for an index lookup inside non-self-closing tags. #522

Merged
merged 1 commit into from Nov 20, 2014

Conversation

sethkinast
Copy link
Contributor

Closes #521.

This internal .text property is used to compare start and close tags to ensure they're balanced. When the tag contains a path lookup, the lookup is itself a compiled node. When a node is compiled, line-number information is attached, which causes the tag to become inbalanced.

The patch simply strips line-number information from this internal marker.

… an index lookup inside non-self-closing tags.

Closes linkedin#521.
source: "{#loop.array[key.foo].sub}{.}{/loop.array[key.foo].sub}",
context: {
"loop": {
"array": {"thing": {sub: 1, sap: 2}, "thing2": "bar"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Lies!

prashn64 added a commit that referenced this pull request Nov 20, 2014
Fix the use of a multi-level object key (e.g. foo.bar) as the key for an index lookup inside non-self-closing tags.
@prashn64 prashn64 merged commit 28b482a into linkedin:master Nov 20, 2014
@sethkinast sethkinast deleted the nested-key-array-access branch December 11, 2014 08:55
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.

Problems looping variables with associative arrays
3 participants