coolreader icon indicating copy to clipboard operation
coolreader copied to clipboard

Paragraphs inside list items are displayed on a separate line

Open link2xt opened this issue 5 years ago • 3 comments

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: 1

In Firefox, all list items look the same: 1

Same HTML packed in EPUB also displays incorrectly.

link2xt avatar Apr 15 '19 13:04 link2xt

It'd be a good idea to look at the KOReader modifications in this matter. It renders correctly:

Screenshot_2019-04-15_20-59-24

(Add a <style>p {text-indent:1em}</style> to the document to give Fx the same styles as our defaults.)

Frenzie avatar Apr 15 '19 19:04 Frenzie

Interesting, I did not know that KOReader is based on crengine. A link for reference: https://github.com/koreader/crengine

link2xt avatar Apr 15 '19 21:04 link2xt

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

link2xt avatar Apr 15 '19 22:04 link2xt