| @@ 400-410 (lines=11) @@ | ||
| 397 | // Some source control tools don't like it when files containing lines longer |
|
| 398 | // than, say 8000 characters, are checked in. The linebreak option is used in |
|
| 399 | // that case to split long lines after a specific column. |
|
| 400 | if ($linebreak_pos !== FALSE && (int) $linebreak_pos >= 0) { |
|
| 401 | $linebreak_pos = (int) $linebreak_pos; |
|
| 402 | $start_index = $i = 0; |
|
| 403 | while ($i < strlen($css)) { |
|
| 404 | $i++; |
|
| 405 | if ($css[$i - 1] === '}' && $i - $start_index > $linebreak_pos) { |
|
| 406 | $css = $this->str_slice($css, 0, $i) . "\n" . $this->str_slice($css, $i); |
|
| 407 | $start_index = $i; |
|
| 408 | } |
|
| 409 | } |
|
| 410 | } |
|
| 411 | ||
| 412 | // restore preserved comments and strings in reverse order |
|
| 413 | for ($i = count($this->preserved_tokens) - 1; $i >= 0; $i--) { |
|
| @@ 404-414 (lines=11) @@ | ||
| 401 | // Some source control tools don't like it when files containing lines longer |
|
| 402 | // than, say 8000 characters, are checked in. The linebreak option is used in |
|
| 403 | // that case to split long lines after a specific column. |
|
| 404 | if ($linebreak_pos !== FALSE && (int) $linebreak_pos >= 0) { |
|
| 405 | $linebreak_pos = (int) $linebreak_pos; |
|
| 406 | $start_index = $i = 0; |
|
| 407 | while ($i < strlen($css)) { |
|
| 408 | $i++; |
|
| 409 | if ($css[$i - 1] === '}' && $i - $start_index > $linebreak_pos) { |
|
| 410 | $css = $this->str_slice($css, 0, $i) . "\n" . $this->str_slice($css, $i); |
|
| 411 | $start_index = $i; |
|
| 412 | } |
|
| 413 | } |
|
| 414 | } |
|
| 415 | ||
| 416 | // restore preserved comments and strings in reverse order |
|
| 417 | for ($i = count($this->preserved_tokens) - 1; $i >= 0; $i--) { |
|