![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
![]()
once upon a time - in sigil 4, 5, 6 I could regex a fix e.g. to all chapter headings
like this find <p class "whatever" >CHAPTER replace <h2 class "whatever" >CHAPTER replace all and sigil would helpfully do the closing tags to match, so no need for long complicated regex doesn't work for me now in v7 - what default settings do I need to change or has this feature now been "upgraded" out of existence I tried the obvious toggles for tidy/pretty print.... |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
What is keeping you from including the closing tag in your regex? Hoping that Tidy (who actually did that) will guess the correct end tag can lead to quite unexpected results.
Sure, the regex might become a little more complex, but it will give better predictable results. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Doesn't Tidy still do it? If you dare!
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
it is much easier to let tidy do it but I could not get it to work in v7.
the reason for not doing the whole thing in regex is just complexity. you have to capture what comes after CHAPTER & embed in the replace line, plus I hate it when "Upgrades" take away stuff takes worked before. i did one the "hard way" yesterday but then decided to ask if my old workflow could still be made to work. stripping double embedded blockquotes is also much harder now that you can't ask tidy to do half of the work it was very reliable before so long as you used replace all and not just replace. not just for this but also for upgrading/ downgrading header tags e.g. <h1 to <h2. I got used to doing a visual check before saving so if the book did get screwed up I'd discard & start over. |
![]() |
![]() |
![]() |
#5 | |
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:
Gotta say, my one big (inadvertent) experience with allowing PP to "tidy" my tags was pretty freaking disastrous, resulting in ye olden PSO'D. I would not recommend this. Hitch |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
![]() i want my fumbling amateur hack back ![]() |
|
![]() |
![]() |
![]() |
#7 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
This was brought up shortly after this latest version came out. I think meme said at that time that they would look at it, but it would take a new approach based on tags instead of what they are doing now .
I think this is their point of view...no amateur hour stuff that only half works, since the user base is pros and serious amateurs. |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
hey, I am a serious amateur - I am seriously, some would say obsessively, fussy about the layout of e-books that I read & I'd seriously like this back
![]() |
![]() |
![]() |
![]() |
#9 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
I feel your pain every time I have to get rid of font size=-1 over and over again.
I also feel the pain of trying to regex things that take 10 regexs to get rid of what use to automatically disappear. But I don't like sections magically disappearing as well, especially after things have just being going great and I haven't saved for half an hour. It ALWAYS happens that way. |
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,548
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() Find: Code:
<(/?)h1([^>]+)?> Code:
<\1h2\2> Last edited by DiapDealer; 05-22-2013 at 07:55 AM. |
|
![]() |
![]() |
![]() |
#11 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,019
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Promoting and Demoting headers were sections included in the Saved Searches 'Samples'
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,548
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
To each their own, though ... certainly. ![]() |
|
![]() |
![]() |
![]() |
#13 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,019
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:
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
closing tags not auto-fixing | cybmole | Sigil | 8 | 12-04-2012 08:49 AM |
Word autofix; Leave dialog alone | morriss003 | Writers' Corner | 1 | 07-26-2012 02:02 AM |
questions on self-closing tags and legal xhtml in epubs | KevinH | ePub | 5 | 04-23-2012 10:12 PM |
Help with EPUb validation and closing tags | book24 | ePub | 1 | 05-24-2011 05:16 PM |
Release 0.7.54 - Mobi self-closing tags | Moonraker | Calibre | 2 | 04-09-2011 07:35 AM |