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

friendlytag: Put tags under csd and prod nominations (not afd yet) #541

Merged

Conversation

Amorymeltzer
Copy link
Collaborator

Uses regex from the speedy module, partial fix for #237. AfD is NOT supported because it doesn't lead with a template, but rather with a <!-- comment.

This regex was already enormous and unwieldy, and is now even worse. It'd be good to clean it up, but even modern js isn't fully pcre, so there's no /x to help us out.

Uses regex from the speedy module, partial fix for wikimedia-gadgets#237.  AfD is NOT supported because it doesn't lead with a template, but rather with a <!-- comment.

This regex was already enormous and unwieldy, and is now even worse.  It'd be good to clean it up, but even modern js isn't fully pcre, so there's no /x to help us out.
@Amorymeltzer
Copy link
Collaborator Author

Amorymeltzer commented Mar 9, 2019

This should do the trick for CSD and PROD templates, but AfD is tricky as it doesn't use a template to start off, but rather a comment:

<!-- Please do not remove or change this AfD message until the discussion has been closed. -->

This poses all sorts of annoyances, since that comment is followed by a template and then two more comments, one of which has template code inside of it.

@Amorymeltzer Amorymeltzer merged commit df05674 into wikimedia-gadgets:master Mar 30, 2019
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Apr 11, 2019
Continues on wikimedia-gadgets#541, closes wikimedia-gadgets#237.  Makes regex far more readable.

Co-authored-by: Amory Meltzer <Amorymeltzer@gmail.com>
Co-authored-by: Siddharth VP <siddharthvp@gmail.com>
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.

1 participant