mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-19 19:41:29 +02:00
Remove complex string interpolation expressions
This commit is contained in:
parent
7f4318dbdb
commit
a9764ec90f
@ -409,7 +409,7 @@ class Parsedown
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$Block['element']['rawHtml'] .= "\n{$Line['body']}";
|
$Block['element']['rawHtml'] .= "\n" . $Line['body'];
|
||||||
|
|
||||||
if (strpos($Line['text'], '-->') !== false)
|
if (strpos($Line['text'], '-->') !== false)
|
||||||
{
|
{
|
||||||
@ -486,7 +486,7 @@ class Parsedown
|
|||||||
return $Block;
|
return $Block;
|
||||||
}
|
}
|
||||||
|
|
||||||
$Block['element']['element']['text'] .= "\n{$Line['body']}";
|
$Block['element']['element']['text'] .= "\n" . $Line['body'];
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
}
|
}
|
||||||
@ -819,7 +819,7 @@ class Parsedown
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$Block['element']['rawHtml'] .= "\n{$Line['body']}";
|
$Block['element']['rawHtml'] .= "\n" . $Line['body'];
|
||||||
|
|
||||||
return $Block;
|
return $Block;
|
||||||
}
|
}
|
||||||
@ -1011,7 +1011,7 @@ class Parsedown
|
|||||||
if (isset($Block['alignments'][$index]))
|
if (isset($Block['alignments'][$index]))
|
||||||
{
|
{
|
||||||
$Element['attributes'] = array(
|
$Element['attributes'] = array(
|
||||||
'style' => "text-align: {$Block['alignments'][$index]};",
|
'style' => 'text-align: ' . $Block['alignments'][$index] . ';',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1453,7 +1453,7 @@ class Parsedown
|
|||||||
and preg_match('/^&(#?+[0-9a-zA-Z]++);/', $Excerpt['text'], $matches)
|
and preg_match('/^&(#?+[0-9a-zA-Z]++);/', $Excerpt['text'], $matches)
|
||||||
) {
|
) {
|
||||||
return array(
|
return array(
|
||||||
'element' => array('rawHtml' => "&{$matches[1]};"),
|
'element' => array('rawHtml' => '&' . $matches[1] . ';'),
|
||||||
'extent' => strlen($matches[0]),
|
'extent' => strlen($matches[0]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1656,7 +1656,7 @@ class Parsedown
|
|||||||
|
|
||||||
if ($hasName)
|
if ($hasName)
|
||||||
{
|
{
|
||||||
$markup .= "<{$Element['name']}";
|
$markup .= '<' . $Element['name'];
|
||||||
|
|
||||||
if (isset($Element['attributes']))
|
if (isset($Element['attributes']))
|
||||||
{
|
{
|
||||||
@ -1714,7 +1714,7 @@ class Parsedown
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$markup .= $hasName ? "</{$Element['name']}>" : '';
|
$markup .= $hasName ? '</' . $Element['name'] . '>' : '';
|
||||||
}
|
}
|
||||||
elseif ($hasName)
|
elseif ($hasName)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user