unkepubify: Remove kobo-style comments

This commit is contained in:
Kovid Goyal 2025-02-23 20:10:19 +05:30
parent 9199cb6905
commit 91731ab5b8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -115,6 +115,9 @@ def remove_kobo_styles_and_scripts(root):
for script in XPath('//h:script')(root):
if script.get('type') == 'text/javascript' and is_href_to_fname(script.get('src'), KOBO_JS_NAME):
extract(script)
for comment in root.iter(tag=etree.Comment):
if comment.text == ' kobo-style ': # these are present in KEPUB from Kobo
extract(comment)
def wrap_body_contents(body):