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

Allow alternative path separators in references #130

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

Conversation

smfoote
Copy link
Owner

@smfoote smfoote commented Oct 28, 2015

One common complaint about Dust is that dots in a reference are always
interpreted as steps in the context path. This change allows for dots in
the path to be interpreted as plain text strings instead of steps in the
context path.

Example:

{com.linkedin.dots.in.path|myVal sep="|"}
{
  "com.linkedin.dots.in.path": {
    "myVal": "DOTS"
  }
}

TODO: Make this work for helpers as well (currently only works for
references)

One common complaint about Dust is that dots in a reference are always
interpreted as steps in the context path. This change allows for dots in
the path to be interpreted as plain text strings instead of steps in the
context path.

Example:

```
{com.linkedin.dots.in.path|myVal sep="|"}
```

```
{
  "com.linkedin.dots.in.path": {
    "myVal": "DOTS"
  }
}
```

TODO: Make this work for helpers as well (currently only works for
references)
@jimmyhchan
Copy link
Collaborator

params in references feels awesome and strange. Feels inline with the "everything is a helper" mantra.

But it feels like we are hard coding the sep parameter. What if we need another reference modifier. Seems like we will run into issues. I want to say I want something more explicit.

wdyt?

{%referenceSep sep="|"}{com.linkedin.dots.in.path|myVal}{/referenceSep}

@smfoote
Copy link
Owner Author

smfoote commented Oct 28, 2015

I like it a lot. I was thinking it would be good to have a way to define a separator for a whole block, instead of on every reference.

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