![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Aug 2024
Device: none
|
![]()
Simply by parsing and committing an xhtml file, using the container, I see the following changes to the content.
Before parsing: <span x="y"/> <div id="w"/> After committing: <span x="y"></span> <div id="w"></div> Is there a 'tweak' setting or other method I can use to preserve the compact version of for tags with only attributes and no content? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No there isn't, IIRC.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Aug 2024
Device: none
|
I have not looked at the Calibre code. Hopefully there is an option on the serializer to use compact closing tags (i.e. <sometag/>) instead of <sometag></sometag>. If this is the case, how difficult do you think it would be to add a tweak to set this option? Is this something you or I can look at? I would need a few hints where to start looking.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is done deliberately, see line 441 in oeb/base.py
|
![]() |
![]() |
![]() |
#5 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,375
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
xhtml tags |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inserting self closing tags (xhtml) | roger64 | Editor | 2 | 03-04-2018 05:49 AM |
TOC nav.xhtml issue | ebookscovers | Conversion | 1 | 05-06-2017 11:12 AM |
questions on self-closing tags and legal xhtml in epubs | KevinH | ePub | 5 | 04-23-2012 10:12 PM |
Issue closing ebook reader in Linux | hairybiker | Calibre | 8 | 05-31-2011 02:17 PM |
Issue with converting xhtml to epub using Calibre | sg31 | Calibre | 0 | 10-20-2009 06:26 PM |