]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - mdwn2man
web commit by joey
[git.ikiwiki.info.git] / mdwn2man
index 13b1b84a8131b0e80eaf323d315534a3c627555d..57c41c86590042f9f6a8a89a64ec569fd07348ba 100755 (executable)
--- a/mdwn2man
+++ b/mdwn2man
@@ -4,12 +4,11 @@
 print ".TH ikiwiki 1\n";
 
 while (<>) {
 print ".TH ikiwiki 1\n";
 
 while (<>) {
+       s{(\\?)\[\[([^\s\]]+)\]\]}{$1 ? "[[$2]]" : $2}eg;
        s/^#\s/.SH /;
        s/^\s+//;
        s/^Warning:.*//g;
        s/^$/.PP\n/;
        s/^#\s/.SH /;
        s/^\s+//;
        s/^Warning:.*//g;
        s/^$/.PP\n/;
-       s/\[\[//g;
-       s/\]\]//g;
        s/\`//g;
        s/^\*\s+(.*)/.IP "$1"/;
        next if $_ eq ".PP\n" && $skippara;
        s/\`//g;
        s/^\*\s+(.*)/.IP "$1"/;
        next if $_ eq ".PP\n" && $skippara;