aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.js')
-rw-r--r--src/regex.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/regex.js b/src/regex.js
index bd59e9c..672f194 100644
--- a/src/regex.js
+++ b/src/regex.js
@@ -36,4 +36,26 @@ SVG.regex = {
/* test for namespaced event */
, isEvent: /^[\w]+.[\w]+$/
+ // The following regex are used to parse the d attribute of a path
+
+ // Replaces all negative exponents
+, negExp: /e\-/gi
+
+ // Replaces all comma
+, comma: /,/g
+
+ // Replaces all hyphens
+, hyphen: /\-/g
+
+ // Replaces and tests for all path letters
+, pathLetters: /[MLHVCSQTAZ]/gi
+
+ // yes we need this one, too
+, isPathLetter: /[MLHVCSQTAZ]/i
+
+ // split at whitespaces
+, whitespaces: /\s+/
+
+ // matches X
+, X: /X/g
} \ No newline at end of file