Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Unify interpolation delimiters #95

Open
lex111 opened this issue Dec 6, 2020 · 3 comments
Open

Unify interpolation delimiters #95

lex111 opened this issue Dec 6, 2020 · 3 comments

Comments

@lex111
Copy link
Member

lex111 commented Dec 6, 2020

This is related to #78

Unfortunately, the "Leave an issue" link on the JS survey does not actually work now.

So I think we need to go back to interpolation delimiters (without "$") in Vulcan.js style, and for survey results on Gatsby define custom delimiters in the Lodash template in translator.js file, this way interpolation will work the same for both frameworks.

cc @SachaG

@SachaG
Copy link
Member

SachaG commented Dec 6, 2020

Good point! To clarify, we're talking about

  • hello ${name}, how are you today?

vs

  • hello {name}, how are you today?

The first one seems more standard to me since it's already how string interpolation works in JS, so maybe we should keep that?

@lex111
Copy link
Member Author

lex111 commented Dec 7, 2020

It doesn't really matter, I just didn't find a way to define custom delimiters in Vulcan.js, but in Lodash (i.e. Gatsby results app) it's possible.

@SachaG
Copy link
Member

SachaG commented Dec 14, 2020

Oh actually I think you were right, if we use ${} then it becomes a pain to escape the $ when the strings are defined in JavaScript files. Let's change it the other way around then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants