mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
PHP < 7 patch
This commit is contained in:
parent
3f74fe8347
commit
35d24d0b56
@ -136,6 +136,11 @@ final class FencedCode implements ContinuableBlock
|
||||
\strcspn($this->infostring(), " \t\n\f\r")
|
||||
);
|
||||
|
||||
// only necessary pre-php7
|
||||
if ($infostring === false) {
|
||||
$infostring = '';
|
||||
}
|
||||
|
||||
return new Element('pre', [], [new Element(
|
||||
'code',
|
||||
$infostring !== '' ? ['class' => "language-{$infostring}"] : [],
|
||||
|
Loading…
Reference in New Issue
Block a user