Skip to content

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

Open
bywo wants to merge 1 commit intomikeric:masterfrom
bywo:wrappedPaths
Open

add support for paths wrapped in single-quotes along with tests#228
bywo wants to merge 1 commit intomikeric:masterfrom
bywo:wrappedPaths

Conversation

@bywo
Copy link
Copy Markdown

@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