@phensley/messageformat
Advanced tools
Comparing version 0.25.10 to 0.25.11
@@ -57,2 +57,3 @@ export var parseMessagePattern = function (raw, matcher) { | ||
} | ||
var hidden = str[r.s + 1] === "-" /* MINUS */; | ||
var k = this.seek(r.s, r.e); | ||
@@ -63,2 +64,8 @@ if (k === -1) { | ||
} | ||
else if (hidden) { | ||
// Tag is hidden from processor, emit as text | ||
n.push(text("{" /* LEFT */ + str.substring(r.s + 2, k + 1))); | ||
// Skip over hidden tag | ||
r.s = k; | ||
} | ||
else { | ||
@@ -164,2 +171,3 @@ // Process tag interior | ||
} | ||
var hidden = this.raw[r.s + 1] === "-" /* MINUS */; | ||
// Find matching end delimter | ||
@@ -173,3 +181,5 @@ var k = this.seek(r.s, r.e); | ||
// Parse nested block and skip over it | ||
var node = this.outer({ t: r.t, s: r.s + 1, e: k }, argsub); | ||
var node = hidden | ||
? text("{" /* LEFT */ + this.raw.substring(r.s + 2, k + 1)) | ||
: this.outer({ t: r.t, s: r.s + 1, e: k }, argsub); | ||
r.s = k + 1; | ||
@@ -176,0 +186,0 @@ return node; |
@@ -59,2 +59,3 @@ "use strict"; | ||
} | ||
var hidden = str[r.s + 1] === "-" /* MINUS */; | ||
var k = this.seek(r.s, r.e); | ||
@@ -65,2 +66,8 @@ if (k === -1) { | ||
} | ||
else if (hidden) { | ||
// Tag is hidden from processor, emit as text | ||
n.push(text("{" /* LEFT */ + str.substring(r.s + 2, k + 1))); | ||
// Skip over hidden tag | ||
r.s = k; | ||
} | ||
else { | ||
@@ -166,2 +173,3 @@ // Process tag interior | ||
} | ||
var hidden = this.raw[r.s + 1] === "-" /* MINUS */; | ||
// Find matching end delimter | ||
@@ -175,3 +183,5 @@ var k = this.seek(r.s, r.e); | ||
// Parse nested block and skip over it | ||
var node = this.outer({ t: r.t, s: r.s + 1, e: k }, argsub); | ||
var node = hidden | ||
? text("{" /* LEFT */ + this.raw.substring(r.s + 2, k + 1)) | ||
: this.outer({ t: r.t, s: r.s + 1, e: k }, argsub); | ||
r.s = k + 1; | ||
@@ -178,0 +188,0 @@ return node; |
{ | ||
"name": "@phensley/messageformat", | ||
"version": "0.25.10", | ||
"version": "0.25.11", | ||
"description": "Extensible ICU message formatter", | ||
@@ -37,5 +37,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@phensley/cldr-utils": "0.25.10", | ||
"@phensley/decimal": "0.25.10", | ||
"@phensley/plurals": "0.25.10", | ||
"@phensley/cldr-utils": "0.25.11", | ||
"@phensley/decimal": "0.25.11", | ||
"@phensley/plurals": "0.25.11", | ||
"tslib": "1.10.x" | ||
@@ -69,3 +69,3 @@ }, | ||
}, | ||
"gitHead": "bf14b014d571372cd7f3688ef8bd7c541ba75ea5" | ||
"gitHead": "7a5c21e4a311b0101a26c22b586475500db34a09" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
125653
1893
+ Added@phensley/cldr-utils@0.25.11(transitive)
+ Added@phensley/decimal@0.25.11(transitive)
+ Added@phensley/plurals@0.25.11(transitive)
- Removed@phensley/cldr-utils@0.25.10(transitive)
- Removed@phensley/decimal@0.25.10(transitive)
- Removed@phensley/plurals@0.25.10(transitive)
Updated@phensley/cldr-utils@0.25.11
Updated@phensley/decimal@0.25.11
Updated@phensley/plurals@0.25.11