1
0
mirror of https://github.com/erusev/parsedown.git synced 2025-09-03 03:42:38 +02:00

Merge pull request #578 from aidantwoods/fix/setext-heading-spaces

Fix setext heading space handling
This commit is contained in:
Aidan Woods
2018-03-25 23:08:31 +01:00
committed by GitHub
3 changed files with 45 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;