Fix space handling in setext headings

This commit is contained in:
Aidan Woods 2018-03-25 22:50:42 +01:00
parent 913e04782f
commit f71bec00f4
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
1 changed files with 4 additions and 2 deletions

View File

@ -705,8 +705,10 @@ class Parsedown
return;
}
if (chop($Line['text'], $Line['text'][0]) === '')
{
if (
chop(chop($Line['text'], ' '), $Line['text'][0]) === ''
and $Line['indent'] < 4
) {
$Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2';
return $Block;