improve cafeyn

fix le monde broken toc
This commit is contained in:
quenousimporte 2024-07-09 14:57:24 +02:00
parent 0cb02d15f0
commit df3c954ab4
1 changed files with 6 additions and 2 deletions

View File

@ -139,7 +139,7 @@
$article = json_decode($articlejson);
$content = '<h1>' . $article->title . '</h1>';
$content .= '<b>' . $article->abstract . '</b>';
//$content .= '<b>' . $article->abstract . '</b>';
$content .= '<div>Page ' . $article->page . '</div>';
if (count($article->rubrics))
@ -165,6 +165,10 @@
{
$content .= '<h2>' .$item->content . '</h2>';
}
else if ($item->class == 'introduction')
{
$content .= '<p><b>' .$item->content . '</b></p>';
}
else
{
$content .= '<p>' .$item->content . '</p>';
@ -278,7 +282,7 @@
}
$pagecontent .= $articlebody->HtmlText;
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title), true);
$epub->AddPage($pagecontent, false, str_replace('&nbsp;', ' ', strip_tags($articlebody->Title)), true);
}
}
write_epub($epub);