From 71de817bae812129bc678ca24c45cc5988daff6e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 18 Feb 2012 19:40:18 +0100 Subject: [PATCH] try new markup function --- modules/motd/templates/motd.erb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index 777ce8fcb..496b5dde6 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -12,12 +12,8 @@ def wrap(s, width=78) end def markup(l) - if l =~ /\[\[(\*|-)?(.*?)\]\]/ - l = $2 - end - if l =~ /\[\[(.*?)\|(.*?)\]\]/ - l = $2 - end + l = l.gsub(/\[\[(.*?)\|(.*?)\]\]/, '\2') + l = l.gsub(/\[\[(\*|-)?(.*?)\]\]/, '\2') return l end -- 2.20.1