@followupus/common 0.10.9 → 0.10.10
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/dist/utils/format.js +2 -2
- package/package.json +1 -1
package/dist/utils/format.js
CHANGED
|
@@ -44,9 +44,9 @@ export function truncateString(str, maxLength) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
//** case insensitive
|
|
47
|
-
//** {Who} can be replaced by variable {who:{name:ttt}}
|
|
47
|
+
//** {{Who}} can be replaced by variable {who:{name:ttt}}
|
|
48
48
|
export function formatTemplate(text, rawVariables, maxLength = Number.MAX_SAFE_INTEGER) {
|
|
49
|
-
const matches = text?.match(/{([^}]+)}/g);
|
|
49
|
+
const matches = text?.match(/{{([^}]+)}}/g);
|
|
50
50
|
if (matches) {
|
|
51
51
|
const formatVariables = keysToLowerCase(rawVariables);
|
|
52
52
|
let finalStr = text || "";
|