Skip to content

Commit e8372e7

Browse files
committed
step
1 parent 7857e76 commit e8372e7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

history.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
+ Section.page_count contains number of pdf pages that has been generated for section after add_section call.
2+
13
12.02.2026 ver.1.12
24
-------------------
35

tests/test/test_converter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ def test_hrefs(self):
7878
"""Convert hrefs content to pdf."""
7979
from markdown_pdf import Section, MarkdownPdf
8080

81+
sect = Section(open(self.fixture("hrefs.md"), "rt", encoding='utf-8').read())
82+
assert sect.page_count == 0
8183
pdf = MarkdownPdf()
82-
pdf.add_section(
83-
Section(open(self.fixture("hrefs.md"), "rt", encoding='utf-8').read())
84-
)
84+
pdf.add_section(sect)
85+
assert sect.page_count == 1
86+
8587
pdf.save(self.build("hrefs.pdf"))
8688

8789
def test_bytes(self):

0 commit comments

Comments
 (0)