From: Peter Palfrader Date: Tue, 15 Jul 2008 13:55:44 +0000 (+0200) Subject: Also support [[link|wiki links with alternate link text]]. X-Git-Tag: release-0.3.33~66 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=commitdiff_plain;h=be8fd4aac4624ffe3c42a869d3a8b6c0f633a7d5 Also support [[link|wiki links with alternate link text]]. --- diff --git a/debian/changelog b/debian/changelog index 95c4811..d20e3df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +userdir-ldap-cgi (0.3.12) unstable; urgency=low + + * Also support [[link|wiki links with alternate link text]]. + + -- Peter Palfrader Tue, 15 Jul 2008 15:54:19 +0200 + userdir-ldap-cgi (0.3.11) unstable; urgency=low * Show purposes as a bullet list diff --git a/machines.cgi b/machines.cgi index c50c4cb..4cfe3a8 100755 --- a/machines.cgi +++ b/machines.cgi @@ -83,6 +83,13 @@ sub sshfingerprint { return $hrfpr; } +sub wiki_link($) { + my ($in) = @_; + $in =~ s#\[\[(.*?)\|(.*?)\]\]#$2#g; + $in =~ s#\[\[(.*?)\]\]#$1#g; + return $in; +} + sub purposes_uplist($) { my ($purposes) = @_; my $out = undef; @@ -90,8 +97,7 @@ sub purposes_uplist($) { if (scalar @$purposes >= 1) { $out = "";