mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
986dea628b
commit
ca03d35d85
@ -156,7 +156,8 @@ class CHMReader(CHMFile):
|
||||
break
|
||||
if self.hhc_path not in files and files:
|
||||
for f in files:
|
||||
if f.partition('.')[-1].lower() in {'html', 'htm'}:
|
||||
if f.partition('.')[-1].lower() in {'html', 'htm', 'xhtm',
|
||||
'xhtml'}:
|
||||
self.hhc_path = f
|
||||
break
|
||||
|
||||
@ -168,6 +169,9 @@ class CHMReader(CHMFile):
|
||||
self.hhc_path = os.path.relpath(x, output_dir)
|
||||
break
|
||||
|
||||
if self.hhc_path not in files and files:
|
||||
self.hhc_path = files[0]
|
||||
|
||||
def _reformat(self, data, htmlpath):
|
||||
if self.input_encoding:
|
||||
data = data.decode(self.input_encoding)
|
||||
|
Loading…
x
Reference in New Issue
Block a user