]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/motd/templates/motd.erb
try new markup function
[dsa-puppet.git] / modules / motd / templates / motd.erb
index 777ce8fcb5fdd1c2a6d9e9105a950905482921f4..496b5dde6e608cfc6fb4e5a11beaaf8944597a78 100644 (file)
@@ -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