Skip to content

Commit

Permalink
Fix #16: Add variable size for h1 headings
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayak-mehta committed Aug 20, 2020
1 parent 6b910b4 commit 446385d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion present/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class Heading(object):
@property
def size(self):
if self.obj["level"] == 1:
return 6
f = Figlet()
text = self.obj["children"][0]["text"]
return len(f.renderText(text).splitlines())
elif self.obj["level"] == 2:
return 2
else:
Expand Down

0 comments on commit 446385d

Please sign in to comment.