X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Ftemplates%2Fmotd.erb;h=496b5dde6e608cfc6fb4e5a11beaaf8944597a78;hb=9d82937165f5d14ac208eea79b14b0fd59006e36;hp=777ce8fcb5fdd1c2a6d9e9105a950905482921f4;hpb=7c9af8bba4c3bef111049a5f27bdaa190ee73ac6;p=mirror%2Fdsa-puppet.git 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