webpack-easyi18n 0.4.0 → 0.5.0
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/package.json +1 -1
- package/src/index.js +4 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -118,6 +118,9 @@ class EasyI18nPlugin {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
// Escape the translated text BEFORE formatting/splicing
|
|
122
|
+
replacement = EasyI18nPlugin.escapeNuggets(replacement);
|
|
123
|
+
|
|
121
124
|
// format nuggets
|
|
122
125
|
var formatItemsMatch = originalText.match(/\|\|\|(.+?)(?:\/\/\/.+?)?\]\]\]/s)
|
|
123
126
|
if (formatItemsMatch) {
|
|
@@ -134,7 +137,7 @@ class EasyI18nPlugin {
|
|
|
134
137
|
});
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
return
|
|
140
|
+
return replacement;
|
|
138
141
|
});
|
|
139
142
|
|
|
140
143
|
compilation.updateAsset(filename, new SourceMapSource(
|