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

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

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;