From 1ac48cbb64159b42c39e842fd2bb38bef25c1662 Mon Sep 17 00:00:00 2001 From: "5468sun@mbp" <5468sun@mbp> Date: Sun, 19 May 2019 16:44:29 +0800 Subject: [PATCH] add two unsupported self defined unit for later dynamic px2dp sizing --- src/tokenTypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokenTypes.js b/src/tokenTypes.js index 30e8850..8e035ef 100644 --- a/src/tokenTypes.js +++ b/src/tokenTypes.js @@ -34,7 +34,7 @@ const identRe = /(^-?[_a-z][_a-z0-9-]*$)/i const numberRe = /^([+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?)$/ // Note lengthRe is sneaky: you can omit units for 0 const lengthRe = /^(0$|(?:[+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?)(?=px$))/ -const unsupportedUnitRe = /^([+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt))$/ +const unsupportedUnitRe = /^([+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?(ch|em|ex|rem|vh|vw|vmin|vmax|cm|mm|in|pc|pt|pxdp|pxfz))$/ const angleRe = /^([+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?(?:deg|rad))$/ const percentRe = /^([+-]?(?:\d*\.)?\d+(?:[Ee][+-]?\d+)?%)$/