add blank line before ATX-style headings to avoid ambiguity (#178)

Signed-off-by: chrispy <chrispy@synopsys.com>
This commit is contained in:
Chris Papademetrious
2025-01-21 11:00:51 -05:00
committed by GitHub
parent 7fec8a2080
commit f24ec9e83c
2 changed files with 30 additions and 25 deletions

View File

@@ -373,8 +373,8 @@ class MarkdownConverter(object):
text = all_whitespace_re.sub(' ', text)
hashes = '#' * n
if style == ATX_CLOSED:
return '\n%s %s %s\n\n' % (hashes, text, hashes)
return '\n%s %s\n\n' % (hashes, text)
return '\n\n%s %s %s\n\n' % (hashes, text, hashes)
return '\n\n%s %s\n\n' % (hashes, text)
def convert_hr(self, el, text, convert_as_inline):
return '\n\n---\n\n'