02-07-2023, 08:40 PM
|
#8022
|
Plugin Developer
Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Originally Posted by ownedbycats
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...
- 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. 
- I think it would be slightly cheaper computationally to do:
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.
- 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.
|
|
|