Fix newline start in header tags (#89)

* Fix newline start in header tags
This commit is contained in:
Veronika Butkevich
2024-03-26 20:46:30 +01:00
committed by GitHub
parent a2f82678f7
commit f33ccd7c1a
2 changed files with 9 additions and 1 deletions

View File

@@ -265,7 +265,7 @@ class MarkdownConverter(object):
return text
style = self.options['heading_style'].lower()
text = text.rstrip()
text = text.strip()
if style == UNDERLINED and n <= 2:
line = '=' if n == 1 else '-'
return self.underline(text, line)