Skip to content

Commit

Permalink
Fixed segmentation fault with empty markdown heading (bump PyMuPDF up…
Browse files Browse the repository at this point in the history
… to 1.24.6). (#42)
  • Loading branch information
vb64 authored Jan 8, 2025
1 parent 30a3008 commit 0f65a3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
+ Method `add_section` returns content of added section as html string.

- Fixed segmentation fault with empty markdown heading (bump PyMuPDF up to 1.24.6).

22.12.2024 ver.1.3.2
--------------------

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PyMuPDF==1.24.2
PyMuPDF==1.24.6
markdown-it-py==3.0.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ package_dir =
packages = markdown_pdf
python_requires = >=3.8
install_requires =
PyMuPDF==1.24.2
PyMuPDF==1.24.6
markdown-it-py==3.0.0
8 changes: 8 additions & 0 deletions tests/test/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,11 @@ def test_pathlib(self):

file_path = Path(self.build('output.pdf'))
pdf.save(file_path)

def test_empty_head(self):
"""Check markdown with empty head."""
from markdown_pdf import MarkdownPdf, Section

pdf = MarkdownPdf(toc_level=2)
pdf.add_section(Section("# "))
pdf.save(self.build("empty-head.pdf"))

0 comments on commit 0f65a3a

Please sign in to comment.