Skip to content

Commit

Permalink
Merge pull request #49 from pstast/patch-1
Browse files Browse the repository at this point in the history
preg_split() compatibility with HHVM
  • Loading branch information
mtibben committed Feb 22, 2016
2 parents 71b36c5 + 623da4d commit 1338bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Html2Text.php
Expand Up @@ -565,7 +565,7 @@ protected function pregPreCallback(/** @noinspection PhpUnusedParameterInspectio
protected function toupper($str)
{
// string can contain HTML tags
$chunks = preg_split('/(<[^>]*>)/', $str, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$chunks = preg_split('/(<[^>]*>)/', $str, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);

// convert toupper only the text between HTML tags
foreach ($chunks as $i => $chunk) {
Expand Down

0 comments on commit 1338bc9

Please sign in to comment.