diff options
Diffstat (limited to 'src/regex.js')
-rw-r--r-- | src/regex.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/regex.js b/src/regex.js index a6ffb98..1b26afd 100644 --- a/src/regex.js +++ b/src/regex.js @@ -42,4 +42,26 @@ SVG.regex = { // Test for image url , isImage: /\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i + // 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 |