File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ + Section.page_count contains number of pdf pages that has been generated for section after add_section call.
2+
1312.02.2026 ver.1.12
24-------------------
35
Original file line number Diff line number Diff 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 ):
You can’t perform that action at this time.
0 commit comments