-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
First of all, thank you for your lib :)
I'm experiencing a possible bug. If I try this example:
const replaceTemplate = require('string-template');
const input = "https://{user}:{password}@{domain}/api/endpoint1?parameter1={parameterValue1}";
const replacements = {
user: 'Eric',
password: 'a pass',
domain: 'any-url.com'
};
const test = replaceTemplate(input, replacements);
The result is like this:
"https://Eric:a pass@any-url.com/api/endpoint1?parameter1=";
parameterValue1 is lost. I should expect an output like this:
"https://Eric:a pass@any-url.com/api/endpoint1?parameter1={parameterValue1}";
To put you in context, I'm developing an API with Loopback 4 using datasource templating and they use {} as delimiters. My idea was to join their bindings with my own thanks to your lib.
Maybe it could also be related with #12 because with custom delimiters, this error could be work-arounded.
akashmugu
Metadata
Metadata
Assignees
Labels
No labels