diff options
Diffstat (limited to 'src/regex.js')
-rw-r--r-- | src/regex.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/regex.js b/src/regex.js index 4cd74ae..4286d8a 100644 --- a/src/regex.js +++ b/src/regex.js @@ -13,7 +13,7 @@ SVG.regex = { /* parse rgb value */ , rgb: /rgb\((\d+),(\d+),(\d+)\)/ - + /* test hex value */ , isHex: /^#[a-f0-9]{3,6}$/i @@ -31,5 +31,8 @@ SVG.regex = { /* test for numeric string */ , isNumber: /^-?[\d\.]+$/ + + /* test for percent value */ +, isPercent: /^-?[\d\.]+%$/ }
\ No newline at end of file |