mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Trim in renderer
This commit is contained in:
parent
3ccd64a9a1
commit
4a215f33d4
@ -47,9 +47,6 @@ final class Parsedown
|
|||||||
|
|
||||||
$html = self::render($Renderables);
|
$html = self::render($Renderables);
|
||||||
|
|
||||||
# trim line breaks
|
|
||||||
$html = \trim($html, "\n");
|
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +242,8 @@ final class Parsedown
|
|||||||
*/
|
*/
|
||||||
public static function render(array $Renderables)
|
public static function render(array $Renderables)
|
||||||
{
|
{
|
||||||
return \array_reduce(
|
return \trim(
|
||||||
|
\array_reduce(
|
||||||
$Renderables,
|
$Renderables,
|
||||||
/**
|
/**
|
||||||
* @param string $html
|
* @param string $html
|
||||||
@ -257,6 +255,8 @@ final class Parsedown
|
|||||||
return $html . ($newHtml === '' ? '' : "\n") . $newHtml;
|
return $html . ($newHtml === '' ? '' : "\n") . $newHtml;
|
||||||
},
|
},
|
||||||
''
|
''
|
||||||
|
),
|
||||||
|
"\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user