Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-04-2015, 06:55 AM   #1
Ryn
Connoisseur
Ryn began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
Bug report: Doctype removed on file merge

Merge files and the doctype declaration gets omitted from the merged document, whilst being present in both original xhtml files.

visually, this

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">
after merging becomes

Code:
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
adding obviousness, we're talking epub2 here.

edit: i'm using the OSX build on El Capitan (v 10.11.1)

(is this the right venue for Sigil bug reports?)
Ryn is offline   Reply With Quote
Old 12-04-2015, 07:29 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,378
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Confirmed.

Open Sigil
Add blank html file
Highlight both html files, right-click and and select Merge.
doctype disappears

Place cursor in front of one of the p tags in code view
Click Edit->Spit at cursor
(then click Split at cursor because spitting at it won't accomplish anything )
The doctype will reappear on the first file, but not the second.

Quote:
(is this the right venue for Sigil bug reports?)
As good as any. Thanks!
DiapDealer is offline   Reply With Quote
Advert
Old 12-04-2015, 09:39 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,499
Karma: 5703586
Join Date: Nov 2009
Device: many
Hi Ryn,

Thanks for your bug report. Both bugs are caused by the same issue in GumboInterface.cpp in perform_body_updates() when it should use serialize() not serialize_contents(). I will merge a fix for this when I get home from work. The fix will appear in the next release.

Thank you for your bug report!

KevinH
KevinH is online now   Reply With Quote
Old 12-04-2015, 10:17 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,378
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Hi Ryn,

Thanks for your bug report. Both bugs are caused by the same issue in GumboInterface.cpp in perform_body_updates() when it should use serialize() not serialize_contents(). I will merge a fix for this when I get home from work. The fix will appear in the next release.

Thank you for your bug report!

KevinH
Aha! I was on the right track at least. But I was still wandering around trying to fix it in the MergeResources method of Book.cpp (where perform_body_updates is called). I needed to dig that one level deeper!
DiapDealer is offline   Reply With Quote
Old 12-04-2015, 10:26 AM   #5
Ryn
Connoisseur
Ryn began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
Thanks guys, for your quick support and awesome program. I use it a lot actually.
Ryn is offline   Reply With Quote
Advert
Old 12-14-2015, 06:14 AM   #6
Ryn
Connoisseur
Ryn began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Feb 2012
Device: none
I have noticed that the doctype declaration reappears on a save. so whereas without the declaration any nbsps present cause an error in book view, when the epub is saved the problem is gone.
Ryn is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug report mtravellerh PocketBook 303 11-03-2013 07:21 PM
i62HD annotation merge PDF bug talizh Onyx Boox 9 01-25-2013 01:38 PM
How to report a bug??? tmlee51 Calibre 2 02-14-2012 11:07 PM
bug report and associated questions paulrw Calibre 20 07-28-2010 04:24 PM


All times are GMT -4. The time now is 05:24 PM.


MobileRead.com is a privately owned, operated and funded community.