mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Fix "span_text not defined" warning
This commit is contained in:
@@ -607,8 +607,8 @@ class EpubParser(BaseBookParser):
|
|||||||
|
|
||||||
# Second fallback: if we have a span but title is still empty, try span text again
|
# Second fallback: if we have a span but title is still empty, try span text again
|
||||||
# (covered by logic above mostly, but mirroring original logic's intense fallback)
|
# (covered by logic above mostly, but mirroring original logic's intense fallback)
|
||||||
if (not title.strip() or title == "Untitled Section") and span_text:
|
if (not title.strip() or title == "Untitled Section") and span_element:
|
||||||
title = span_text.get_text(strip=True) or title
|
title = span_element.get_text(strip=True) or title
|
||||||
|
|
||||||
return title
|
return title
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user