@lingui/macro
Advanced tools
Comparing version 3.10.2 to 3.11.0
@@ -213,3 +213,5 @@ "use strict"; | ||
// if it's an unicode we keep the cooked value because it's the parsed value by babel (without unicode chars) | ||
var value = /\\u[a-fA-F0-9]{4}/g.test(text.value.raw) ? text.value.cooked : text.value.raw; | ||
// This regex will detect if a string contains unicode chars, when they're we should interpolate them | ||
// why? because platforms like react native doesn't parse them, just doing a JSON.parse makes them UTF-8 friendly | ||
var value = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g.test(text.value.raw) ? text.value.cooked : text.value.raw; | ||
if (value === "") return null; | ||
@@ -216,0 +218,0 @@ return { |
@@ -196,4 +196,6 @@ "use strict"; | ||
quasis: R.map(function (text) { | ||
// Don"t output tokens without text. | ||
var value = /\\u[a-fA-F0-9]{4}/g.test(text.value.raw) ? text.value.cooked : text.value.raw; | ||
// if it's an unicode we keep the cooked value because it's the parsed value by babel (without unicode chars) | ||
// This regex will detect if a string contains unicode chars, when they're we should interpolate them | ||
// why? because platforms like react native doesn't parse them, just doing a JSON.parse makes them UTF-8 friendly | ||
var value = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g.test(text.value.raw) ? text.value.cooked : text.value.raw; | ||
if (value === "") return null; | ||
@@ -200,0 +202,0 @@ return _this.tokenizeText(_this.clearBackslashes(value)); |
{ | ||
"name": "@lingui/macro", | ||
"version": "3.10.2", | ||
"version": "3.11.0", | ||
"description": "Macro for generating messages in ICU MessageFormat syntax", | ||
@@ -33,3 +33,3 @@ "main": "index.js", | ||
"@babel/runtime": "^7.11.2", | ||
"@lingui/conf": "^3.10.2", | ||
"@lingui/conf": "^3.11.0", | ||
"ramda": "^0.27.1" | ||
@@ -36,0 +36,0 @@ }, |
47518
971
Updated@lingui/conf@^3.11.0