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

Merge pull request #604 from aidantwoods/fix/autobreak

Ensure autobreak false is honoured over empty name
This commit is contained in:
Aidan Woods 2018-04-06 20:00:32 +01:00 committed by GitHub
commit c6b717cc35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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