wikimedia-gadgets / afc-helper

A tool for reviewing Articles for Creation submissions on the English Wikipedia
https://en.wikipedia.org/wiki/Wikipedia:AFCH
GNU General Public License v3.0
37 stars 80 forks source link

Removed "class=draft" from WikiProject templates when submitting #157

Closed Muditxofficial closed 3 years ago

Muditxofficial commented 3 years ago

issue reference #115

enterprisey commented 3 years ago

@Muditxofficial Sorry for the late response. This is a good start, but will detect every time class=draft occurs on the talk page, even when it's not in a WikiProject template. Honestly, the odds of it creating an error are really low, but I'd rather not risk it. You should change the regular expression so that it requires that {{wikiproject comes before the class=draft part, and }} comes after it. You can use capturing groups to do that. Try to understand what my attempt in https://github.com/WPAFC/afch-rewrite/issues/115#issuecomment-783172502 does - it uses capturing groups (), the "any" character ., and the "1 or more, as few as possible" quantifier +?. (Yeah, I told you in Zulip that any occurrence of class=draft would work - I was speaking imprecisely and will try to avoid doing that in the future, and that was incorrect.)

Muditxofficial commented 3 years ago

(see previous comment)

Yes, i have seen it and will try to make changes in one or two days.