Skip to content

Allow alternative path separators in references#130

Open
smfoote wants to merge 1 commit into
masterfrom
ref-delimiter
Open

Allow alternative path separators in references#130
smfoote wants to merge 1 commit into
masterfrom
ref-delimiter

Conversation

@smfoote

@smfoote smfoote commented Oct 28, 2015

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

smfoote commented Oct 28, 2015

Copy link
Copy Markdown
Owner Author

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