Merge pull request #582 from aidantwoods/fix/formatting

Formatting adjustments
This commit is contained in:
Aidan Woods 2018-03-27 12:12:01 +01:00 committed by GitHub
commit e16162e288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -586,22 +586,17 @@ class Parsedown
$requiredIndent = ($Block['indent'] + strlen($Block['data']['marker'])); $requiredIndent = ($Block['indent'] + strlen($Block['data']['marker']));
if ( if ($Line['indent'] < $requiredIndent
$Line['indent'] < $requiredIndent and (
and
(
( (
$Block['data']['type'] === 'ol' $Block['data']['type'] === 'ol'
and preg_match('/^[0-9]+'.preg_quote($Block['data']['markerType']).'(?:[ ]+(.*)|$)/', $Line['text'], $matches) and preg_match('/^[0-9]+'.preg_quote($Block['data']['markerType']).'(?:[ ]+(.*)|$)/', $Line['text'], $matches)
) ) or (
or
(
$Block['data']['type'] === 'ul' $Block['data']['type'] === 'ul'
and preg_match('/^'.preg_quote($Block['data']['markerType']).'(?:[ ]+(.*)|$)/', $Line['text'], $matches) and preg_match('/^'.preg_quote($Block['data']['markerType']).'(?:[ ]+(.*)|$)/', $Line['text'], $matches)
) )
) )
) ) {
{
if (isset($Block['interrupted'])) if (isset($Block['interrupted']))
{ {
$Block['li']['text'] []= ''; $Block['li']['text'] []= '';