Thread: doubled id
View Single Post
Old 08-11-2016, 11:23 AM   #15
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,745
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
@KevinH and Diapdealer:

I was finally able to reproduce this issue:

1. Copy the following code to Section0001.xhtml in an empty epub:

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>

<body>
  <h2 id="sigil_toc_id_1">This is a heading</h2>
</body>
</html>


2. Switch to Book View mode, enter a random string, e.g. XXX, before the heading text and press Enter. Repeat this several times.

3. Press CTRL+Enter or select Split At Cursor. This will generate the following code in the first split file:

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>
<body>
  <h2 id="sigil_toc_id_1">xxx</h2>
<h2 id="sigil_toc_id_1">xxx</h2>
<h2 id="sigil_toc_id_1">xxx</h2>
<h2 id="sigil_toc_id_1">xxx</h2>
</body>
</html>


Needless to say that this is a user input error and shows once again that editing text in Book View mode is a bad idea.
Doitsu is offline   Reply With Quote