From c6f604c28b9fac6f2b74e3f15fadeae933c88f35 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 28 Aug 2024 16:55:33 +0200 Subject: [PATCH] fix missing article header --- epub.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/epub.php b/epub.php index 3470fa9..ac30bec 100644 --- a/epub.php +++ b/epub.php @@ -78,7 +78,8 @@ { $node = $nodes->item(0); $nodehtml = get_clean_html($node); - $epub->AddPage($nodehtml, false, $title); + $result .= $nodehtml; + $epub->AddPage($result, false, $title); } } @@ -463,7 +464,6 @@ $doc->loadHTML($article); $finder = new DomXPath($doc); - $result = '

' . $title . '

'; $result .= '

' . $author . '

'; $result .= '

' . $item->pubDate . '

'; @@ -479,7 +479,8 @@ { $node = $nodes->item(0); $nodehtml = get_clean_html($node); - $epub->AddPage($nodehtml, false, $title); + $result .= $nodehtml; + $epub->AddPage($result, false, $title); } } @@ -547,7 +548,8 @@ { $node = $nodes->item(0); $nodehtml = get_clean_html($node); - $epub->AddPage($nodehtml, false, $title); + $result .= $nodehtml; + $epub->AddPage($result, false, $title); } } }