View Single Post
Old 12-20-2022, 06:41 AM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by DNSB View Post
Sorry to disagree, but I would suggest replacing the <a href..."wikilink"> with <a> otherwise you'll be hunting down and replacing all the </a>s that have been orphaned.
Yes, good catch. I'll correct the post.

Quote:
Originally Posted by DNSB View Post
After the search/replace, I'd use DiapDealer's TagMechanic to remove the naked <a>whatever</a> pairs.
Yes, yes, if you want to be much safer, always use TagMechanic.

- - -

Side Note: But, in this very specific case, I always just trusted Sigil:
  • Tools > Reformat HTML > Mend and Prettify All HTML Files

to auto-remove those dangling/orphaned </a>:

Code:
disappeared link</a>
But... I know what I'm doing with regex + I run it immediately after doing that pass.

Another time I use that is when I'm fixing up TOCs! I'm just too lazy to correct all the nested mess, so I:
  • Run Tools > Table of Contents > Create HTML Table of Contents.
  • Use Saved Searches + regex to wipe most of it away.
  • Run Mend+Prettify.

and am left with a very clean TOC!

One of these days, I should update those Saved Searches, but they've been serving me so well for 10+ years!!!

Last edited by Tex2002ans; 12-20-2022 at 07:52 AM.
Tex2002ans is offline   Reply With Quote