Skip to content

Commit 9c368ae

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-362
1 parent aa67789 commit 9c368ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/web/mage/utils/misc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,12 @@ define([
9393
var result = mageFormat;
9494

9595
_.each(map, function (moment, mage) {
96-
result = result.replace(mage, moment);
96+
result = result.replace(
97+
new RegExp(`${mage}(?=([^']*'[^']*')*[^']*$)`),
98+
moment
99+
);
97100
});
101+
result = result.replace(/'(.*?)'/g, '[$1]');
98102

99103
return result;
100104
},

0 commit comments

Comments
 (0)