next-translate 1.3.0 → 1.3.4
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.
- package/README.md +1 -0
- package/lib/cjs/transCore.js +1 -1
- package/lib/esm/transCore.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -959,6 +959,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
959
959
|
<td align="center"><a href="https://github.com/testerez"><img src="https://avatars.githubusercontent.com/u/815236?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tom Esterez</b></sub></a><br /><a href="https://github.com/vinissimus/next-translate/commits?author=testerez" title="Code">💻</a></td>
|
|
960
960
|
<td align="center"><a href="http://www.dan-needham.com"><img src="https://avatars.githubusercontent.com/u/1122983?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Needham</b></sub></a><br /><a href="https://github.com/vinissimus/next-translate/commits?author=dndhm" title="Code">💻</a> <a href="https://github.com/vinissimus/next-translate/commits?author=dndhm" title="Tests">⚠️</a> <a href="https://github.com/vinissimus/next-translate/commits?author=dndhm" title="Documentation">📖</a></td>
|
|
961
961
|
<td align="center"><a href="https://www.youtube.com/BrunoAntunesPT"><img src="https://avatars.githubusercontent.com/u/9042965?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bruno Antunes</b></sub></a><br /><a href="https://github.com/vinissimus/next-translate/commits?author=bmvantunes" title="Code">💻</a></td>
|
|
962
|
+
<td align="center"><a href="https://github.com/kaan-atakan"><img src="https://avatars.githubusercontent.com/u/56063979?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaan Atakan</b></sub></a><br /><a href="https://github.com/vinissimus/next-translate/commits?author=kaan-atakan" title="Code">💻</a></td>
|
|
962
963
|
</tr>
|
|
963
964
|
</table>
|
|
964
965
|
|
package/lib/cjs/transCore.js
CHANGED
|
@@ -113,7 +113,7 @@ function interpolation(_a) {
|
|
|
113
113
|
return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
114
114
|
};
|
|
115
115
|
var _b = config.interpolation || {}, _c = _b.format, format = _c === void 0 ? null : _c, _d = _b.prefix, prefix = _d === void 0 ? '{{' : _d, _e = _b.suffix, suffix = _e === void 0 ? '}}' : _e;
|
|
116
|
-
var regexEnd = suffix === '' ? '' : "\\s
|
|
116
|
+
var regexEnd = suffix === '' ? '' : "(?:[\\s,]+([\\w-]*))?\\s*".concat(escapeRegex(suffix));
|
|
117
117
|
return Object.keys(query).reduce(function (all, varKey) {
|
|
118
118
|
var regex = new RegExp("".concat(escapeRegex(prefix), "\\s*").concat(varKey).concat(regexEnd), 'gm');
|
|
119
119
|
return all.replace(regex, function (_match, $1) {
|
package/lib/esm/transCore.js
CHANGED
|
@@ -110,7 +110,7 @@ function interpolation(_a) {
|
|
|
110
110
|
return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
111
111
|
};
|
|
112
112
|
var _b = config.interpolation || {}, _c = _b.format, format = _c === void 0 ? null : _c, _d = _b.prefix, prefix = _d === void 0 ? '{{' : _d, _e = _b.suffix, suffix = _e === void 0 ? '}}' : _e;
|
|
113
|
-
var regexEnd = suffix === '' ? '' : "\\s
|
|
113
|
+
var regexEnd = suffix === '' ? '' : "(?:[\\s,]+([\\w-]*))?\\s*".concat(escapeRegex(suffix));
|
|
114
114
|
return Object.keys(query).reduce(function (all, varKey) {
|
|
115
115
|
var regex = new RegExp("".concat(escapeRegex(prefix), "\\s*").concat(varKey).concat(regexEnd), 'gm');
|
|
116
116
|
return all.replace(regex, function (_match, $1) {
|