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

Use {{reflist}} as opposed to <references /> when automatically adding a reflist #9

Closed
Nathan2055 opened this Issue Jun 21, 2013 · 10 comments

Comments

Projects
None yet
5 participants
@wikipedia-mabdul

This comment has been minimized.

Show comment
Hide comment
@wikipedia-mabdul

wikipedia-mabdul Jun 29, 2013

Member

This isn't abug, should be changed to enhancement as aren't deprecated!

(PS: Give me master rights XD)

Member

wikipedia-mabdul commented Jun 29, 2013

This isn't abug, should be changed to enhancement as aren't deprecated!

(PS: Give me master rights XD)

@wikipedia-mabdul

This comment has been minimized.

Show comment
Hide comment
@wikipedia-mabdul

wikipedia-mabdul Jun 29, 2013

Member

we should think about running https://en.wikipedia.org/wiki/User:PleaseStand/References_segregator after a page move, as this patches always generating |refs= in the {{reflist}} (this can be done with an if clause ithin the regex, don't ask me how that is againworking, I never did that!)

Member

wikipedia-mabdul commented Jun 29, 2013

we should think about running https://en.wikipedia.org/wiki/User:PleaseStand/References_segregator after a page move, as this patches always generating |refs= in the {{reflist}} (this can be done with an if clause ithin the regex, don't ask me how that is againworking, I never did that!)

earwig added a commit that referenced this issue Jun 30, 2013

@wikipedia-mabdul

This comment has been minimized.

Show comment
Hide comment
@wikipedia-mabdul

wikipedia-mabdul Jul 8, 2013

Member

should not add "|refs=" when there are no refs within ref tags

Member

wikipedia-mabdul commented Jul 8, 2013

should not add "|refs=" when there are no refs within ref tags

@wikipedia-mabdul

This comment has been minimized.

Show comment
Hide comment
@wikipedia-mabdul

wikipedia-mabdul Jul 8, 2013

Member

simply to spam nathan2055 with more emails... (trout me at enwp!)

Member

wikipedia-mabdul commented Jul 8, 2013

simply to spam nathan2055 with more emails... (trout me at enwp!)

@Nathan2055

This comment has been minimized.

Show comment
Hide comment
@Nathan2055

Nathan2055 Jul 8, 2013

Member

@wikipedia-mabdul - Actually no, I simply check my GitHub way too much. (Are you watching this or should I keep pinging you?)

Member

Nathan2055 commented Jul 8, 2013

@wikipedia-mabdul - Actually no, I simply check my GitHub way too much. (Are you watching this or should I keep pinging you?)

@theopolisme

This comment has been minimized.

Show comment
Hide comment
@theopolisme

theopolisme Jul 8, 2013

Contributor

Okay, so, could we not simplify the regex to something like

(?:<\s*references\s*>(.*?)</references>|<\s*references\s*/\s*>) --> {{reflist|refs=$1}}

This seems a lot clearer than the previous code. As far as handling a |refs= with no content i think the easiest way to do that is with

text = text.replace("{{reflist|refs=}}","{{reflist}}"); // hack to make sure we don't leave an unneeded |refs=

Thoughts?

Contributor

theopolisme commented Jul 8, 2013

Okay, so, could we not simplify the regex to something like

(?:<\s*references\s*>(.*?)</references>|<\s*references\s*/\s*>) --> {{reflist|refs=$1}}

This seems a lot clearer than the previous code. As far as handling a |refs= with no content i think the easiest way to do that is with

text = text.replace("{{reflist|refs=}}","{{reflist}}"); // hack to make sure we don't leave an unneeded |refs=

Thoughts?

@Nathan2055

This comment has been minimized.

Show comment
Hide comment
@Nathan2055

Nathan2055 Jul 8, 2013

Member

@theopolisme - My limited knowledge of regex combined with common sense thinks it's good. You would have to ask someone who knows a bit more about regex to get a better answer.

Member

Nathan2055 commented Jul 8, 2013

@theopolisme - My limited knowledge of regex combined with common sense thinks it's good. You would have to ask someone who knows a bit more about regex to get a better answer.

@enterprisey

This comment has been minimized.

Show comment
Hide comment
@enterprisey

enterprisey Sep 2, 2013

Member

What? Why was this opened?

Member

enterprisey commented Sep 2, 2013

What? Why was this opened?

@enterprisey enterprisey closed this Sep 2, 2013

@Technical-13

This comment has been minimized.

Show comment
Hide comment
@Technical-13

Technical-13 Sep 2, 2013

Contributor

@APerson241 Is this in the "Stable / Live version" or "INVALID / WONTFIX" Please update the milestone or make a note in a comment so we can sort out what is where. Thanks.

Contributor

Technical-13 commented Sep 2, 2013

@APerson241 Is this in the "Stable / Live version" or "INVALID / WONTFIX" Please update the milestone or make a note in a comment so we can sort out what is where. Thanks.

@enterprisey

This comment has been minimized.

Show comment
Hide comment
@enterprisey

enterprisey Sep 2, 2013

Member

I'm pretty sure that the reflist fix is in the stable version.

See also discussion at issue #142.

Member

enterprisey commented Sep 2, 2013

I'm pretty sure that the reflist fix is in the stable version.

See also discussion at issue #142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment