vendor: Update JShrink to 1.3.1
This fixes mainly problems with PHP 7.3.
This commit is contained in:
parent
fb9dea884c
commit
87e81e6b3a
|
@ -183,7 +183,7 @@ class Minifier
|
|||
// new lines
|
||||
case "\n":
|
||||
// if the next line is something that can't stand alone preserve the newline
|
||||
if (strpos('(-+[@', $this->b) !== false) {
|
||||
if ($this->b !== false && strpos('(-+[@', $this->b) !== false) {
|
||||
echo $this->a;
|
||||
$this->saveString();
|
||||
break;
|
||||
|
@ -231,7 +231,7 @@ class Minifier
|
|||
// check for some regex that breaks stuff
|
||||
if ($this->a === '/' && ($this->b === '\'' || $this->b === '"')) {
|
||||
$this->saveRegex();
|
||||
continue;
|
||||
continue 3;
|
||||
}
|
||||
|
||||
echo $this->a;
|
||||
|
@ -274,9 +274,8 @@ class Minifier
|
|||
if (isset($this->c)) {
|
||||
$char = $this->c;
|
||||
unset($this->c);
|
||||
|
||||
// Otherwise we start pulling from the input.
|
||||
} else {
|
||||
// Otherwise we start pulling from the input.
|
||||
$char = substr($this->input, $this->index, 1);
|
||||
|
||||
// If the next character doesn't exist return false.
|
||||
|
@ -459,11 +458,8 @@ class Minifier
|
|||
echo $this->a;
|
||||
|
||||
// Loop until the string is done
|
||||
while (true) {
|
||||
|
||||
// Grab the very next character and load it into a
|
||||
$this->a = $this->getChar();
|
||||
|
||||
// Grab the very next character and load it into a
|
||||
while (($this->a = $this->getChar()) !== false) {
|
||||
switch ($this->a) {
|
||||
|
||||
// If the string opener (single or double quote) is used
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
curl https://codeload.github.com/tedious/JShrink/tar.gz/v1.3.0 -o JShrink-1.3.0.tar.gz
|
||||
tar xzf JShrink-1.3.0.tar.gz --strip-components 1 JShrink-1.3.0/LICENSE
|
||||
tar xzf JShrink-1.3.0.tar.gz --strip-components 3 JShrink-1.3.0/src/JShrink/Minifier.php
|
||||
rm JShrink-1.3.0.tar.gz
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
VERSION=1.3.1
|
||||
curl -LsS https://github.com/tedious/JShrink/archive/v"$VERSION".tar.gz -o /tmp/JShrink.tar.gz
|
||||
tar xzf /tmp/JShrink.tar.gz --strip-components 1 JShrink-"$VERSION"/LICENSE
|
||||
tar xzf /tmp/JShrink.tar.gz --strip-components 3 JShrink-"$VERSION"/src/JShrink/Minifier.php
|
||||
rm /tmp/JShrink.tar.gz
|
||||
|
|
Loading…
Reference in New Issue