Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfd: fix "2nd AFD of article ending in number" bug #1493

Merged

Conversation

NovemLinguae
Copy link
Member

@NovemLinguae NovemLinguae commented Dec 17, 2021

Twinkle bug. Reported here: https://en.wikipedia.org/wiki/Wikipedia_talk:Twinkle#2015th_nomination

Steps to reproduce:

  • Create article Test (2000)
  • Create article Wikipedia:Articles for deletion/Test (2000)
  • Use Twinkle->XFD->AFD on article Test (2000). It will create an AFD called Wikipedia:Articles for deletion/Test (2001st nomination)

There's a complex RegEx that accepts (2000) and (2000th nom) and (2000th nomination). I hesitate to change it because if someone bothered to code it that way, these are probably AFD formats that were used in the past.

Instead, I opted to institute a maximum AFD number. I set 100 as the max. This should eliminate most year false positives.

image

@siddharthvp
Copy link
Member

I hesitate to change it because if someone bothered to code it that way, these are probably AFD formats that were used in the past.

Other formats seem unlikely, but anyway this seems like a reasonable approach too.

@siddharthvp siddharthvp merged commit b9d05a1 into wikimedia-gadgets:master Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants