File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,16 @@ class EpubItemSupplier { // eslint-disable-line no-unused-vars
3939 }
4040 }
4141
42- makeCoverImageXhtmlFile ( emptyDocFactory ) {
42+ makeCoverImageXhtmlFile ( emptyDocFactory , title ) {
4343 let doc = emptyDocFactory ( ) ;
4444 let body = doc . getElementsByTagName ( "body" ) [ 0 ] ;
4545 let userPreferences = this . imageCollector . userPreferences ;
4646 body . appendChild ( this . coverImageInfo . createImageElement ( userPreferences ) ) ;
47+
48+ if ( title ) {
49+ doc . querySelector ( "title" ) . text = title ;
50+ }
51+
4752 return util . xmlToString ( doc ) ;
4853 }
4954
Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ class EpubPacker {
345345 file . packInEpub ( zipWriter , this . emptyDocFactory , this . contentValidator ) ;
346346 }
347347 if ( epubItemSupplier . hasCoverImageFile ( ) ) {
348- let fileContent = epubItemSupplier . makeCoverImageXhtmlFile ( this . emptyDocFactory ) ;
348+ let fileContent = epubItemSupplier . makeCoverImageXhtmlFile ( this . emptyDocFactory , "Cover" ) ;
349349 zipWriter . add ( EpubPacker . coverImageXhtmlHref ( ) , new zip . TextReader ( fileContent ) ) ;
350350 }
351351 }
You can’t perform that action at this time.
0 commit comments