From 9986babd2e57d2ed0a1313e4fedf75d0f019fd8c Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 1 Sep 2017 18:02:52 -0700 Subject: [PATCH] Wikifetch: strip inline notes in the form "text[note 1]" from IRC --- Wikifetch/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wikifetch/plugin.py b/Wikifetch/plugin.py index 390c201..b95a5e9 100644 --- a/Wikifetch/plugin.py +++ b/Wikifetch/plugin.py @@ -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