Same name and namespace in other branches
  1. 6.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments() 1 commentaire
  2. 7.x-2.x advagg_js_compress/jshrink.inc \JShrink\Minifier::processOneLineComments() 1 commentaire
  3. 8.x-2.x advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments() 1 commentaire
  4. 8.x-3.x advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments() 1 commentaire
  5. 8.x-4.x advagg_js_minify/jshrink.inc \JShrink\Minifier::processOneLineComments() 1 commentaire

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

Paramètres

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

Return value

string

1 call to Minifier::processOneLineComments()
Minifier::getReal dans advagg_js_minify/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 script php.

Fichier

advagg_js_minify/jshrink.inc, line 373

Classe

Minifier
Minifier

Namespace

JShrink

Code

protected function processOneLineComments($startIndex) {
    $thirdCommentString = substr($this->input, $this->index, 1);
    // kill rest of line
    $this->getNext("\n");
    if ($thirdCommentString == '@') {
        $endPoint = $this->index - $startIndex;
        unset($this->c);
        $char = "\n" . substr($this->input, $startIndex, $endPoint);
    }
    else {
        // first one is contents of $this->c
        $this->getChar();
        $char = $this->getChar();
    }
    return $char;
}