Skip to content

Conversation

@helixbass
Copy link
Collaborator

Fixes #5055

So now eg this compiles:

<div>
  {someCondition &&
    <span />
  }
</div>

Basically it was choking on the closing empty INDENT/OUTDENT pair at the end of the parsed tokens inside the nested {...} expression

So in matchWithInterpolations(), similar to the existing tweaking of nested to remove a leading TERMINATOR, added a tweaking to remove a closing INDENT/OUTDENT pair

<div>
{someCondition && <span />}
</div>;
'''
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about a test that confirms that this works with a few other types of line continuators, besides just &&? And what if the next line is at the same indentation, and what if it’s normal code rather than a CSX tag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@GeoffreyBooth sure, added more tests with those variants

@GeoffreyBooth GeoffreyBooth merged commit 8e66ae4 into jashkenas:master May 13, 2018
@GeoffreyBooth GeoffreyBooth mentioned this pull request May 20, 2018
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.

2 participants