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

add support for paths wrapped in single-quotes along with tests #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bywo
Copy link

@bywo bywo commented Nov 6, 2013

Wanted to get the ball rolling on supporting wrapped paths, as discussed in #178 and requested in #178 (comment)

Wrapped paths are useful when the path passed to the adapter contains characters that could be misinterpreted as an adapter, such as backbone deep model.

<div>{ model:'sub.prop' }</div>

model.get('sub.prop') // should be this
model.get('sub').prop // not this
model.get("'sub")["prop'"] // nor this

The implementation is fairly flexible. We can use different wrapping delimeters (allow user to define it?). Using a regex to parse also opens the door to supporting multi-char adapters (e.g. ->).

cime added a commit to cime/rivets that referenced this pull request Jun 20, 2014
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.

1 participant