coolreader
coolreader copied to clipboard
Paragraphs inside list items are displayed on a separate line
Here is an HTML file to reproduce the bug:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />
<title>List</title>
</head>
<body>
<ul>
<li><p>Item 1.</p></li>
<li><p>Item 2.</p></li>
<li>Item 3.</li>
<li><p>Item 4.</p></li>
</ul>
</body>
</html>
I opened it with cr3qt/cr3
and it is displayed as follows:
In Firefox, all list items look the same:
Same HTML packed in EPUB also displays incorrectly.
It'd be a good idea to look at the KOReader modifications in this matter. It renders correctly:
(Add a <style>p {text-indent:1em}</style>
to the document to give Fx the same styles as our defaults.)
Interesting, I did not know that KOReader is based on crengine. A link for reference: https://github.com/koreader/crengine
I have compared this repo with https://github.com/koreader/crengine
It seems there are changes specifically fixing this bug in koreader: https://github.com/koreader/crengine/commit/81b8707216412fc095070f823600af139e508da1