1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Use standard library over while loop

This commit is contained in:
Aidan Woods 2018-04-09 00:05:12 +01:00
parent 2faba6fef5
commit c45e41950f
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -199,12 +199,7 @@ class Parsedown
}
}
$indent = 0;
while (isset($line[$indent]) and $line[$indent] === ' ')
{
$indent ++;
}
$indent = strspn($line, ' ');
$text = $indent > 0 ? substr($line, $indent) : $line;