messageformat
Advanced tools
Comparing version
@@ -88,3 +88,3 @@ import { isValidUnquotedLiteral } from "../cst/names.js"; | ||
if (typeof el === 'string') | ||
res += stringifyString(el, quoted); | ||
res += el.replace(/[\\{}]/g, '\\$&'); | ||
else if (el.type === 'markup') | ||
@@ -97,6 +97,2 @@ res += stringifyMarkup(el); | ||
} | ||
function stringifyString(str, quoted) { | ||
const esc = quoted ? /[\\|]/g : /[\\{}]/g; | ||
return str.replace(esc, '\\$&'); | ||
} | ||
function stringifyExpression({ arg, attributes, functionRef }) { | ||
@@ -103,0 +99,0 @@ let res; |
{ | ||
"name": "messageformat", | ||
"version": "4.0.0-11", | ||
"version": "4.0.0-12", | ||
"description": "Intl.MessageFormat / Unicode MessageFormat 2 parser, runtime and polyfill", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -16,3 +16,3 @@ This library provides a formatter and other tools for [Unicode MessageFormat 2.0] (MF2), | ||
```sh | ||
npm install --save-exact messageformat@next | ||
npm install --save messageformat | ||
``` | ||
@@ -19,0 +19,0 @@ |
141664
-0.1%3472
-0.12%