08-17-2018, 04:11 AM | #1 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
[Issue] Pretty Printing <mark>
<mark> is a new HTML5 element used for highlighting:
https://developer.mozilla.org/en-US/...L/Element/mark https://www.w3.org/TR/html5/textleve...e-mark-element <mark> is mostly used in-line. For example: Spoiler:
After Pretty Printing in Sigil, each <mark> gets extra whitespace + placed on their own lines: Spoiler:
In many cases, this extra whitespace can completely botch the spacing (especially around punctuation). The actual display before Pretty Print: Code:
This is an example of marked text. And a “quote that is important.” Code:
This is an example of marked text . And a “quote that is important .” Last edited by Tex2002ans; 08-17-2018 at 05:39 AM. |
08-17-2018, 09:46 AM | #2 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I will look into it.
Thanks. |
Advert | |
|
08-17-2018, 11:29 AM | #3 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
This should now be fixed in master. And yes handling mark like other inline tags was the answer.
Thank you for your bug report with explanatory links and testcase! It made things much easier to handle. |
08-17-2018, 03:51 PM | #4 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Also, this one is purely for aesthetics, but would it be possible to do a similar thing with Prettifying <td> + <th>? Older versions of Sigil (forget which version) used to keep them "condensed": 2x6 Simple Table (Old Method): This method was easily readable. Note: I recreated the spacing off the top of my head. It was similar to this. Spoiler:
2x6 Simple Table (New Method): Spoiler:
Even the most simple of tables explodes beyond a full screen length. And the way it is indented is much harder to figure out the values + what a table is doing just from the code. |
|
08-17-2018, 04:03 PM | #5 |
Sigil Developer
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Pretty printing tables is hard to do and not easy to change in this case. As td and tr are not inline tags and are more like block tags and are currently treated that way, ie whitespace immediately before and after is ignored. I will look into this when I get more free time but no promises, as technically what is currently done is correct and a search and replace using regular expressions should be possible to change it to what you prefer.
|
Advert | |
|
08-18-2018, 03:52 PM | #6 | |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Spoiler:
I've attached the .ini if anyone wants to import it. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Biography Twain, Mark: Mark Twain's Notebook. v1. 11 Mar 2013 | GrannyGrump | ePub Books | 0 | 03-11-2013 02:07 AM |
PRS-650 Mark all as read/Mark as unread | mornington | Sony Reader | 7 | 07-05-2011 10:43 AM |
Please please please pretty please... | nortydog | Sony Reader Dev Corner | 1 | 01-09-2010 07:23 PM |