@shopify/react-i18n
Advanced tools
Comparing version 7.6.1 to 7.7.0
@@ -89,3 +89,3 @@ 'use strict'; | ||
}; | ||
const DIRECTION_CONTROL_CHARACTERS = '\\p{Cf}'; | ||
const DIRECTION_CONTROL_CHARACTERS = '\u200E\u200F\u202A-\u202E'; | ||
@@ -92,0 +92,0 @@ exports.CurrencyShortFormException = CurrencyShortFormException; |
@@ -22,3 +22,3 @@ 'use strict'; | ||
const REGEX_PERIODS = /\./g; | ||
const NEGATIVE_CHARACTERS = '\\p{Pd}\u2212'; | ||
const NEGATIVE_CHARACTERS = '\u002D\u058A\u05BE\u1806\u2010-\u2015\u2212\u2796\u2E3A\u2E3B\uFE58\uFE63\uFF0D'; | ||
class I18n { | ||
@@ -366,3 +366,3 @@ get language() { | ||
const formattedAmount = this.formatCurrencyNone(amount, options); | ||
const negativeRegex = new RegExp(`[${index.DIRECTION_CONTROL_CHARACTERS}]*[${NEGATIVE_CHARACTERS}]`, 'gu'); | ||
const negativeRegex = new RegExp(`[${index.DIRECTION_CONTROL_CHARACTERS}]*[${NEGATIVE_CHARACTERS}]`, 'g'); | ||
const negativeMatch = ((_negativeRegex$exec = negativeRegex.exec(formattedAmount)) === null || _negativeRegex$exec === void 0 ? void 0 : _negativeRegex$exec.shift()) || ''; | ||
@@ -369,0 +369,0 @@ const shortSymbol = this.getShortCurrencySymbol(options.currency); |
@@ -55,3 +55,3 @@ export declare enum DateStyle { | ||
}; | ||
export declare const DIRECTION_CONTROL_CHARACTERS = "\\p{Cf}"; | ||
export declare const DIRECTION_CONTROL_CHARACTERS = "\u200E\u200F\u202A-\u202E"; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@shopify/react-i18n", | ||
"version": "7.6.1", | ||
"version": "7.7.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "i18n utilities for React handling translations, formatting, and more", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
278625