Wikifetch: strip inline notes in the form "text[note 1]" from IRC

This commit is contained in:
James Lu 2017-09-01 18:02:52 -07:00
parent 199da6e851
commit 9986babd2e

View File

@ -241,8 +241,8 @@ class Wikifetch(callbacks.Plugin):
reply += format('%s %s %u', p, _('Retrieved from'), addr)
reply = reply.replace('&','&')
# Remove inline citations (text[1][2][3], etc.)
reply = re.sub('\[\d+\]', '', reply)
# Remove inline citations (text[1][2][3]) as well as inline notes (text[note 1]).
reply = re.sub('\[[a-z ]*?\d+\]', '', reply)
return reply