diff options
author | wout <wout@impinc.co.uk> | 2014-07-11 23:36:17 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-07-11 23:36:17 +0200 |
commit | 462d2cd3738c904db0be7086878d1fcc17b79553 (patch) | |
tree | afabf22b2f46e5432dc0d56219872f590eb19892 /src/regex.js | |
parent | 7cc2d3635b8ed513e0f4e5be0a1823c1a6ad93dc (diff) | |
download | svg.js-462d2cd3738c904db0be7086878d1fcc17b79553.tar.gz svg.js-462d2cd3738c904db0be7086878d1fcc17b79553.zip |
Completely reworked transform system
Diffstat (limited to 'src/regex.js')
-rwxr-xr-x | src/regex.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/regex.js b/src/regex.js index 13f62d8..8e974a9 100755 --- a/src/regex.js +++ b/src/regex.js @@ -1,39 +1,39 @@ // Storage for regular expressions SVG.regex = { /* parse unit value */ - unit: /^(-?[\d\.]+)([a-z%]{0,2})$/ + unit: /^(-?[\d\.]+)([a-z%]{0,2})$/ /* parse hex value */ -, hex: /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i +, hex: /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i /* parse rgb value */ -, rgb: /rgb\((\d+),(\d+),(\d+)\)/ +, rgb: /rgb\((\d+),(\d+),(\d+)\)/ /* parse reference id */ -, reference: /#([a-z0-9\-_]+)/i +, reference: /#([a-z0-9\-_]+)/i /* test hex value */ -, isHex: /^#[a-f0-9]{3,6}$/i +, isHex: /^#[a-f0-9]{3,6}$/i /* test rgb value */ -, isRgb: /^rgb\(/ +, isRgb: /^rgb\(/ /* test css declaration */ -, isCss: /[^:]+:[^;]+;?/ +, isCss: /[^:]+:[^;]+;?/ /* test for blank string */ -, isBlank: /^(\s+)?$/ +, isBlank: /^(\s+)?$/ /* test for numeric string */ -, isNumber: /^-?[\d\.]+$/ +, isNumber: /^-?[\d\.]+$/ /* test for percent value */ -, isPercent: /^-?[\d\.]+%$/ +, isPercent: /^-?[\d\.]+%$/ /* test for image url */ -, isImage: /\.(jpg|jpeg|png|gif)(\?[^=]+.*)?/i +, isImage: /\.(jpg|jpeg|png|gif)(\?[^=]+.*)?/i /* test for namespaced event */ -, isEvent: /^[\w]+:[\w]+$/ +, isEvent: /^[\w]+:[\w]+$/ }
\ No newline at end of file |