1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Ensure autobreak false is honoured over empty name

This commit is contained in:
Aidan Woods 2018-04-06 19:51:27 +01:00
parent e33f1a48c8
commit 32e69de014
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -1728,8 +1728,8 @@ class Parsedown
foreach ($Elements as $Element)
{
$autoBreakNext = (isset($Element['name'])
|| isset($Element['autobreak']) && $Element['autobreak']
$autoBreakNext = (isset($Element['autobreak']) && $Element['autobreak']
|| ! isset($Element['autobreak']) && isset($Element['name'])
);
// (autobreak === false) covers both sides of an element
$autoBreak = !$autoBreak ? $autoBreak : $autoBreakNext;