Skip to content

Commit 688527a

Browse files
committed
Merge pull request #48 from Pyton/master
UTF Char detection
2 parents b962064 + 978bd44 commit 688527a

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/JShrink/Minifier.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ protected function saveRegex()
537537
*/
538538
protected static function isAlphaNumeric($char)
539539
{
540-
return preg_match('/^[\w\$]$/', $char) === 1 || $char == '/';
540+
return preg_match('/^[\w\$\pL]$/', $char) === 1 || $char == '/';
541541
}
542542

543543
/**
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var π = Math.PI,
2+
ε = 1e-6,
3+
radians = π / 180,
4+
degrees = 180 / π;
5+
6+
function sgn(x) {
7+
8+
9+
var π = Math.PI;
10+
return x > 0 ? 1 : x < 0 ? -1 : 0;
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var π=Math.PI,ε=1e-6,radians=π/ 180,degrees=180 / π;function sgn(x){var π=Math.PI;return x>0?1:x<0?-1:0;}

0 commit comments

Comments
 (0)