diff options
author | lookshe <lookshe@fumuga.com> | 2012-03-07 15:31:53 +0100 |
---|---|---|
committer | lookshe <lookshe@fumuga.com> | 2012-03-07 15:31:53 +0100 |
commit | f55dfe54e1920d9eb9ca09e6519557cade22636b (patch) | |
tree | 73c0faf02d9cf25c35858e77f33ffb6889288679 | |
parent | d1653b29baea89e0aa975ef920c83a2c56aafaaa (diff) |
some more fixes for wiki
-rw-r--r-- | wiki2.pl | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -32,7 +32,7 @@ if (defined $result) { $line=~ s/\s*$//; $comment = 1 if $line =~ m/^<!--$/; $comment = 0 if $line =~ m/^-->$/; - if ($line && $line =~ m/^\*\s?/) { + if ($line && $line =~ m/^\*\s?/ && $ln < 4) { push(@newlines, $newline); push(@newlines, $line); $newline = ""; @@ -51,10 +51,11 @@ if (defined $result) { my $lst = 0; foreach my $line (@newlines) { $line =~ s/<!--.*-->//g; - $line=~ s/.*}}//g; + $line=~ s/^.*}}//g; + $line=~ s/^[^\[]*\]\]//g; $line=~ s/^\s*//; $line=~ s/\s*$//; - if ($line !~ m/^\s*$/) { + if ($line !~ m/^\s*$/ && $line !~ m/^{{Infobox/) { $line = decode_entities($line); #$line =~ s/\([^\(\)]*\)||\[[^\[\]]*\]//g; $line =~ s/\[\[([^|\]]*\|)?([^\]]*)\]\]/$2/g; |