cafe-utility 8.0.0 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1055,13 +1055,13 @@ function resolveVariableWithDefaultSyntax(string, key, value, prefix = '$', sepa
1055
1055
  if (string[index + key.length + 2] === separator) {
1056
1056
  string = string.replace(`${prefix}${key}${separator}${separator}`, value)
1057
1057
  } else {
1058
- const nextWord = readNextWord(string, index + key.length + 2)
1058
+ const nextWord = readNextWord(string, index + key.length + 2, ['_'])
1059
1059
  string = string.replace(`${prefix}${key}${separator}${nextWord}`, value)
1060
1060
  }
1061
1061
  } else {
1062
1062
  string = string.replace(`${prefix}${key}`, value)
1063
1063
  }
1064
- index = string.indexOf(`${prefix}${key}`, index + 1)
1064
+ index = string.indexOf(`${prefix}${key}`, index + value.length)
1065
1065
  }
1066
1066
  return string
1067
1067
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cafe-utility",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "exports": {