Changeset 7966
- Timestamp:
- 03/19/08 12:34:42 (1 year ago)
- Files:
-
- branches/1.0/lib/util/sfToolkit.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/util/sfToolkit.class.php
r7791 r7966 177 177 public static function stripComments($source) 178 178 { 179 if (!sfConfig::get('sf_strip_comments', true)) 180 { 181 return $source; 182 } 183 184 // tokenizer available? 185 if (!function_exists('token_get_all')) 186 { 187 $source = sfToolkit::pregtr($source, array('#/\*((?!\*/)[\d\D\s])*\*/#' => '', // remove /* ... */ 188 '#^\s*//.*$#m' => '')); // remove // ... 189 179 if (!sfConfig::get('sf_strip_comments', true) || !function_exists('token_get_all')) 180 { 190 181 return $source; 191 182 }

