|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 310
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Disappointed with 'Mend and Prettify' when <table>'s included.
Recently I was recommended to use Mend regularly as a safe and prudent procedure. Foolishly, I used 'Mend and Prettify' rather than plain old vanilla Mend.
While scrolling down through an xhtml file to select all the body content, I was surprised to see so much white space passing before my eyes in Code View. When I investigated, I found Prettify had reworked all the <tables> so every cell in every row occupied four lines: one each for <td>, content, </td>, and a blank line. Plus <tr> on its own row as was </tr> and with another blank line between them. The tables were not very complicated, and I had built them with 3 to 4 cells per line in CV and I was quite happy to have </tr><tr> on the same line without any empty lines. Prettify added around 600 extra lines to each of the files which had tables. This doesn't cause any problems for the machines but it makes editing hard for me to see where I am in the table. It took a little while to clean up but I think the message (for me at any rate) is not to use Prettify if you have some tables in the file. |
|
|
|
|
|
#2 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,126
Karma: 6565346
Join Date: Nov 2009
Device: many
|
... or if you care about whitespace and have any css styling that preserves whitespace with no corresponding pre tag in the xhtml.
The "prettifying" for tables can be adjusted but people are so particular about table layout and what users prefer is idiosyncratic, so trying to please everyone is just not possible. Some want a complete row on one line, while others want each row to be blocks with indented td values one per line. In the latter case, things can be found easier as the structure of the table is more clearly delineated by the indentation, counts can be made, etc. Prettify is never meant to make the smallest representation but a representation where it is easy to find and detect structure for CV purposes. As you said, when it works, the entire table changes nothing when seen in Preview. If you can in detail give me an example of a "better" Prettified table that will clearly show structure, then by all means propose one and try to get people here to agree with you. If there is enough interested parties in the new format, I will take a shot at making the Prettify code do that for a future release. Last edited by KevinH; 10-17-2025 at 05:24 PM. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Also, as was mentioned in a previous thread about this, you can make a saved search group that will make it look exactly how you like. I just mark the table and run the saved search against marked text.
Last edited by Turtle91; 10-17-2025 at 07:23 PM. |
|
|
|
|
|
#4 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 310
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Another question comes to mind from this episode. I noted that Prettify inserted <tbody> tags. It's been a long time since I bothered with <thead> and <tbody> in my small tables. I just checked with my usual source of reference, W3 Schools, and it doesn't appear to be mandatory to use those tags. Are there any reading devices adversely affected by missing <thead> and <tbody> tags? |
|
|
|
|
|
|
#5 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I couldn’t say if there were or not. Including them doesn’t hurt, not including them might….
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,126
Karma: 6565346
Join Date: Nov 2009
Device: many
|
And this is xhtml not html that lets you skip many tags as inferred.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| About "Mend and Prettify Code" | RbnJrg | Sigil | 1 | 10-06-2025 08:12 PM |
| Sigil Prettify Code | iMilazzo | Sigil | 26 | 05-12-2025 11:09 AM |
| [GUI Plugin] Prettify Cover | m1d1 | Plugins | 63 | 03-19-2024 09:40 AM |
| Prettify HTML questions | n9qqk | Sigil | 13 | 03-06-2018 01:47 PM |
| Free (nook/Kindle) Marriage on the Mend: Healing Your Relationship [Xtian Self-Help] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 7 | 07-13-2015 11:52 PM |