Changeset 471
- Timestamp:
- Mar 20, 2014 1:47:43 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/js/Msg.js
r469 r471 95 95 Strangecode.Msg.prototype.clear = function() { 96 96 // Append this raised message to the sc-msg stack. 97 msg_class = (typeof msg_class === 'undefined') ? 'sc-msg-error' : msg_class;97 var msg_class = (typeof msg_class === 'undefined') ? 'sc-msg-error' : msg_class; 98 98 $(this.o.container).find('.sc-js-msg').remove(); 99 99 }; -
trunk/lib/CSS.inc.php
r468 r471 169 169 if ($this->getParam('strip_whitespace')) { 170 170 // Strip whitespace and print file. 171 echo preg_replace('/[ \t\n\r]+/', ' ', file_get_contents($file, true)); 171 echo preg_replace( 172 array('!/\*.*?\*/!s', '/[\n\r]+/', '/([;:])\s+/m', '/\s*}[ \t]*/', '/\s*{\s*/', '/[ \t\n\r]*,[ \t\n\r]*/', '/^\s+/'), 173 array('', "\n", '$1', '}', '{', ',', ''), file_get_contents($file, true) 174 ); 172 175 } else { 173 176 // Include file as is. -
trunk/lib/JS.inc.php
r469 r471 169 169 if ($this->getParam('strip_whitespace')) { 170 170 // Strip whitespace and print file. 171 echo preg_replace(array('@^\s*//.*$@m', '@/\*.*?\*/@s', '/[ \t\n\r]+/'), ' ', file_get_contents($file, true)); 171 echo preg_replace( 172 array('!^\s*//.*$!m', '!/\*.*?\*/!s', '/[\n\r]+/', '/[ \t]*}[ \t]*/', '/\s*{\s*/', '/\s*=\s*/', '/^\s+/m'), 173 array('', '', "\n", '}', '{', '=', ''), file_get_contents($file, true) 174 ); 172 175 } else { 173 176 // Include file as is.
Note: See TracChangeset
for help on using the changeset viewer.