![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That may be the difference. I never bother trying to manually untangle an unruly div nest (even though 'Prettify' makes divs fairly easy for me to navigate) these days. So I'm never really looking for a particular closing tag in the first place. If the markup in question can't be safely/quickly regexed, then I turn to a parsing tool to safely match and delete/change tag pairs. Knowing where the closing tag is ahead of time provides no benefit in my editing process. *shrug*
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
In the same vein as Doitsu, it can also be useful when a large number of <span> are using it or when an aberrant use is made of it.
I know that here we are all more or less expert, and that we avoid this kind of situation, but when we try to repair a book... from the internet ![]() And then it's not a big highlight red. The example of Notepad++ is excellent: discreet, but easily visible if you look for it specifically. (Obviously to the extent that it can be implemented) |
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If only there were a parsing tool (usable within Sigil) that could help a user easily and safely change/delete tag pairs (even in a rat's nest of nested elements) without needing to know which particular closing tag went with which opening tag.
![]() |
![]() |
![]() |
![]() |
#20 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
And what parsing tool might that be? (I know that CTRL+. will add a closing tag, but don't know any keyboard shortcut for deleting tag pairs.)
Last edited by Doitsu; 10-31-2020 at 11:46 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I think it has the words 'Tag' and 'Mechanic' in the name.
![]() |
![]() |
![]() |
![]() |
#22 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#24 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
This is my BaenDeDiv search (I adjust the calibre# as it varies Code:
Find="(?sm)<div class=\"calibre4\" id=\"calibre_pb_\\d+\">\\s+<p (.+)</p>\\s+(<div class=\"calibre6\" id=\"calibre_pb_\\d+\"></div>\\s+)*</div>" 99\Replace=<p \\1 </p> |
|
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
So you don't need to know where the closing tag is either! You just run your regex repeatedly.
![]() |
![]() |
![]() |
![]() |
#26 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
When you're trying to correct ugly code, seeing the highlight out of the corner of your eye at-a-glance speeds up debugging. Those fractions of a second add up! Again, back to the URL examples, many times you get junk where URLs are duplicated near punctuation: Code:
<a href="reallyreallylongurl">"Example article</a><a href="reallyreallylongurl">"</a><a href="reallyreallylongurl">.</a><a href="reallyreallylongurl"></a> Code:
<a href="reallyreallylongurl">"Example article"</a>. With Highlighting Tags You click in the first <a>, see the matching </a> in your peripheral. Your brain goes into "debug the code" mode:
With Syntax Highlighting You click in the first <a>. "Debug the code" mode:
Your eyes are going from left->right. The colors help, but once you start seeing lots of <a> and </a> close together, the markup can visually merge into a big blob. Brain trying to parse and look through markup/colors at the same time. Computer instantly parses. No errors. Brain very slow and error prone. Computer help brain. Brain feel better! Brain not need work so hard! ![]() Side Note: On all this UI/UX design and QoL enhancements, there was this set of fantastic videos by Tentacrul covering little niggles and inconsistencies adding up:
He breaks down:
then gives recommendations on how they can be enhanced. Lots of great info that could be applied across many programs. ![]() Quote:
![]() In the case of <a>, I also make heavy use of Tools > Reports > Links. Absolutely fantastic for spotting junk in links. ![]() But again, that's sometimes where Calibre's highlighting is more helpful. As I'm jumping around the book, clicking into <a> tags, you can more quickly/easily parse code using your eyes. Side Note: Another method I've used is this one: Search: (<a href="[^"]+">)([^<]+)</a>\1 Replace: \1\2 OR: Search: (<a href="[^"]+">)([^<]+)</a><a href="[^"]+"> Replace: \1\2 First one catches exact same URL right next to each other. Merges them together. Second one catches any URL right next to each other. Merges them together. And yet another basic: Search: </a><a <---- Put a space here points our links that are right near each other. Usually something fishy's going on when that happens. ![]() Quote:
![]() Last edited by Tex2002ans; 10-31-2020 at 09:09 PM. |
|||
![]() |
![]() |
![]() |
#27 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
![]() |
![]() |
![]() |
#28 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
![]() I agree. IF the work needed to implement the above is doable, not excessive and convenient I am sure KevinH and Diap will seriously consider implementing it in a future release. N.B. Guarantees and/or timescales should not be requested! |
|
![]() |
![]() |
![]() |
#29 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
We do still see a lot of cleanup, with stuff that's so nested that it's devolved backward right into its own egg, so...tag matching would be loverly. Hitch |
|
![]() |
![]() |
![]() |
#30 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
![]() ![]() It most Certainly Was NOT! Unfortunately there are some forum members who I think, shall we say, are over forceful and sometimes verge on disrespectful in the way they put forward RFQ's to KevinH and Diap. It was people of this water I was addressing. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Quick Question | Moonbeam111 | KOReader | 9 | 08-28-2019 12:16 PM |
Quick Question.. | The Branimal | Kobo Reader | 3 | 04-25-2011 08:17 PM |
Quick question... | Magic Man | Calibre | 18 | 09-05-2010 03:18 PM |
PRS-600 Okay, quick question.... | emonti8384 | Sony Reader | 13 | 11-12-2009 06:18 PM |
Quick Question. | Baz047 | Sony Reader | 10 | 12-09-2008 12:25 PM |