From be8fd4aac4624ffe3c42a869d3a8b6c0f633a7d5 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 15 Jul 2008 15:55:44 +0200 Subject: [PATCH] Also support [[link|wiki links with alternate link text]]. --- debian/changelog | 6 ++++++ machines.cgi | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) 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 = ""; -- 2.20.1