Permalink
Browse files

v4.1 Removed extra spacing added to class names and IDs

  • Loading branch information...
1 parent 201fe47 commit 758f716c8faadf56bbb8e4f46af4c0ad107d59d4 Dawson Toth committed Nov 17, 2010
Showing with 8 additions and 5 deletions.
  1. +2 −0 CHANGELOG
  2. +3 −3 redux.js
  3. +3 −2 redux.min.js
View
@@ -1,3 +1,5 @@
+v4.1 Removed extra spacing added to class names and IDs
+
v4 11/16/2010
Fixed issue 4 -- Slow JSS parsing
Altered attributes to now come before their selectors, instead of after (see the README for more information)
View
@@ -1,5 +1,5 @@
/*!
-* Appcelerator Redux v4 by Dawson Toth
+* Appcelerator Redux v4.1 by Dawson Toth
* http://tothsolutions.com/
*/
@@ -38,8 +38,8 @@ function parseJSS(contents) {
.split('!==').join('!=') // fix extra equal sign we added to inequality operator
.split('[').join('[Ti.') // add the Ti. namespace to all attributes
.replace(/\n\[([^\]]+)\]/gm, 'if($1)\n') // finish replacing attributes with an if statement
- .replace(/\n\.([^{]+)\s*\{/gm, 'redux.fn.setDefaultByClassName("$1",{') // replace all .classNames with a call to redux.setDefaultByClassName
- .replace(/\n#([^{]+)\s*\{/gm, 'redux.fn.setDefaultByID("$1",{') // replace all #ids with a call to redux.fn.setDefaultByID
+ .replace(/\n\.([^{]+)\s*\{/gm, 'redux.fn.setDefaultByClassName("$1".split(" ").join(""),{') // replace all .classNames with a call to redux.setDefaultByClassName
+ .replace(/\n#([^{]+)\s*\{/gm, 'redux.fn.setDefaultByID("$1".split(" ").join(""),{') // replace all #ids with a call to redux.fn.setDefaultByID
.replace(/\n([a-zA-Z0-9_-]+)\s*\{/gm, 'redux.fn.setDefaultByType("$1",{'); // replace the other selects with a call to redux.fn.setDefaultByType
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 758f716

Please sign in to comment.