View Single Post
Old 02-07-2023, 08:40 PM   #8022
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
I managed to work this out. x/x and x/? fics get just the first number; x/y fics get both. Please let me know if any improvements to be made:
Well, since you asked...
  1. To the best of my knowledge, there's no reason to copy chapterslashtotal to a new entry instead of editing chapterslashtotal.
    But kudos for preemptive paranoia.
  2. I think it would be slightly cheaper computationally to do:
    Code:
     ao3chaps=>/\?$=>
    IE, just removing the trailing /? rather than also matching number and replacing both with the number. But I doubt you could even measure the difference in normal use.
  3. I wouldn't use both \1 and \g<1> in the same line. There's no difference in this case and it invites possible future confusion.
    By which I mean, I had to look up \g<1> to be sure it didn't have some additional special meaning.
JimmXinu is offline   Reply With Quote