![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
|
Beautify question
Hi,
Now and again I will come across a file that defies the beautify rules. Nothing separates between </p> and <p>. All ends up as one big text glob. It does not affect the output but makes editing time consuming. Any reason why this would happen? Thanks Phil |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Beautify will only beautify when it can be reasonably certain that the changes it makes will not affect the rendered appearance. Lots of things can cause it to refuse to beautify. If you want to force it copy paste the HTML into some external beuatify tool that is not so careful and paste the result back.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 448
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
I don't have an example at hand, but I've seen this happen if a bunch of <p>s are surrounded by other code, like some <div> or <pre> or something. Remove that surrounding thing, which is usually useless or in error, and Beautify will work again.
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
|
Thanks for the explanations.
Not going to trust an external beautifier. Will look for extraneous tags. Phil |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
I sometimes also have problems with Beautify, where in certain xhtml pages, it does nothing.
The culprit is a set of empty <div class="something"></div> tags either just below the <body> tag or below the heading tags. Once I delete these tags, beautify works as per normal. Next time I come across a book with that issue, I'll scramble it and upload it if anybody is interested in checking out why it does that. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
|
Found it.
Duplicate body tags. Removed one and all works. Thanks for the replies and ideas on where to look. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
beautify files icon | rjwse@aol.com | Editor | 2 | 03-26-2021 04:00 PM |
Beautify not working | theducks | Editor | 4 | 10-09-2019 08:26 PM |
"Beautify" question | pmorris | Editor | 1 | 06-09-2014 11:17 AM |
Beautify feature | BobC | Editor | 1 | 03-15-2014 09:24 AM |
Beautify Baen e-books | IceHand | Workshop | 1 | 02-21-2008 09:57 AM |