Skip to content

Commit 12cae88

Browse files
fix: fix parsing of font sizes for pdfs with no headings (#155)
1 parent cb3ba46 commit 12cae88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raglite/_markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def extract_font_size(span: dict[str, Any]) -> float:
7070
span_font_size = extract_font_size(span)
7171
if span_font_size < mode_font_size:
7272
idx = 7
73-
elif span_font_size == mode_font_size:
73+
elif span_font_size == mode_font_size or len(heading_font_sizes) == 0:
7474
idx = 6
7575
else:
7676
idx = np.argmin(np.abs(heading_font_sizes - span_font_size)) # type: ignore[assignment]

0 commit comments

Comments
 (0)