projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dfe3c0
)
try new markup function
author
Peter Palfrader
<peter@palfrader.org>
Sat, 18 Feb 2012 18:40:18 +0000
(19:40 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Sat, 18 Feb 2012 18:40:18 +0000
(19:40 +0100)
modules/motd/templates/motd.erb
patch
|
blob
|
history
diff --git
a/modules/motd/templates/motd.erb
b/modules/motd/templates/motd.erb
index
777ce8f
..
496b5dd
100644
(file)
--- 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