You are here

protected function Minifier::processOneLineComments in Advanced CSS/JS Aggregation 7.2

Same name and namespace in other branches
  1. 8.4 advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments()
  2. 8.2 advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments()
  3. 8.3 advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments()

Removed one line comments, with the exception of some very specific types of conditional comments.

Parameters

int $startIndex The index point where "getReal" function started:

Return value

void

1 call to Minifier::processOneLineComments()
Minifier::getReal in advagg_js_compress/jshrink.inc
This function gets the next "real" character. It is essentially a wrapper around the getChar function that skips comments. This has significant performance benefits as the skipping is done using native functions (ie, c code) rather than in…

File

advagg_js_compress/jshrink.inc, line 384

Class

Minifier
Minifier

Namespace

JShrink

Code

protected function processOneLineComments($startIndex) {
  $thirdCommentString = substr($this->input, $this->index, 1);

  // kill rest of line
  $this
    ->getNext("\n");
  unset($this->c);
  if ($thirdCommentString == '@') {
    $endPoint = $this->index - $startIndex;
    $this->c = "\n" . substr($this->input, $startIndex, $endPoint);
  }
}