mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
code blocks get unwanted empty lines
This commit is contained in:
parent
ecf86b073e
commit
7249d02cff
@ -216,7 +216,12 @@ class Parsedown
|
||||
{
|
||||
if ($element['type'] === 'code')
|
||||
{
|
||||
isset($element['interrupted']) and $element['text'] .= "\n";
|
||||
if (isset($element['interrupted']))
|
||||
{
|
||||
$element['text'] .= "\n";
|
||||
|
||||
unset ($element['interrupted']);
|
||||
}
|
||||
|
||||
$element['text'] .= "\n".$matches[1];
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
<p>Here's a regular code block:</p>
|
||||
<pre><code><?php
|
||||
|
||||
echo 'Hello World!';
|
||||
|
||||
?></code></pre>
|
||||
<p>Here's one that holds a list:</p>
|
||||
<pre><code>- list item
|
||||
<p>Here's a code block:</p>
|
||||
<pre><code><?php
|
||||
|
||||
$message = 'Hello World!';
|
||||
echo $message;</code></pre>
|
||||
<p>Here's one that holds a list:</p>
|
||||
<pre><code>- list item
|
||||
- another list item</code></pre>
|
@ -1,13 +1,12 @@
|
||||
Here's a regular code block:
|
||||
|
||||
<?php
|
||||
|
||||
echo 'Hello World!';
|
||||
|
||||
?>
|
||||
|
||||
Here's one that holds a list:
|
||||
|
||||
- list item
|
||||
- another list item
|
||||
|
||||
Here's a code block:
|
||||
|
||||
<?php
|
||||
|
||||
$message = 'Hello World!';
|
||||
echo $message;
|
||||
|
||||
Here's one that holds a list:
|
||||
|
||||
- list item
|
||||
- another list item
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user