--- phpwiki/phpwiki-dump.pl 2006/11/19 14:57:40 1 +++ phpwiki/phpwiki-dump.pl 2006/11/20 18:43:09 2 @@ -36,13 +36,18 @@ $content =~ s/^!!!!!\s*(.*?)$/^^^^^ $1/mg; $content =~ s/!([A-Z]\w+)/$1/mg; - + + # markup $content =~ s!''(.*?)''!/$1/!mg; $content =~ s!__(.*?)__!*$1*!mg; + # links to url $content =~ s!\[\s*(.+?)\s*[\s\|]\s*((http://|mailto:)\S+)\s*\]!"$1"<$2>!mg; $content =~ s!\[\s*(http://\S+)\s*[\s\|]\s*(.+?)\s*\]!"$2"<$1>!mg; + # page links with names + $content =~ s!\[\s*([\w\s]+)\s*\|\s*(\w+)\s*\]!"$1"[$2]!mg; + my $seen; my $out; foreach (split(/[\n\r]/, $content)) {