]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of git://git.ikiwiki.info into cvs
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Tue, 24 Jan 2012 07:40:43 +0000 (02:40 -0500)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Tue, 24 Jan 2012 07:40:43 +0000 (02:40 -0500)
IkiWiki/Plugin/mdwn.pm
IkiWiki/Plugin/recentchangesdiff.pm
doc/rcs/cvs/discussion.mdwn
doc/sandbox/Test_it.mdwn [new file with mode: 0644]

index 3c3fc9579fc7fa78959fad3e4ddf7b3bf67ce003..430194bffdcc6444f34036709d9dc3767187af85 100644 (file)
@@ -58,7 +58,7 @@ sub htmlize (@) {
                        }
                }
                if (! defined $markdown_sub &&
-                   exists $config{nodiscount} && ! $config{nodiscount}) {
+                   (! exists $config{nodiscount} || ! $config{nodiscount})) {
                        eval q{use Text::Markdown::Discount};
                        if (! $@) {
                                $markdown_sub=sub {
index 71297572d7b74a5042e18fd93128a4dca773e170..41882279331f8b1a2171bb98197602197ba64190 100644 (file)
@@ -31,13 +31,21 @@ sub pagetemplate (@) {
                my @lines=IkiWiki::rcs_diff($params{rev}, $maxlines+1);
                if (@lines) {
                        my $diff;
+                       my $trunc=0;
                        if (@lines > $maxlines) {
-                               $diff=join("", @lines[0..($maxlines-1)])."\n".
-                                       gettext("(Diff truncated)");
+                               $diff=join("", @lines[0..($maxlines-1)]);
+                               $trunc=1;
                        }
                        else {
                                $diff=join("", @lines);
                        }
+                       if (length $diff > 102400) {
+                               $diff=substr($diff, 0, 10240);
+                               $trunc=1;
+                       }
+                       if ($trunc) {
+                               $diff.="\n".gettext("(Diff truncated)");
+                       }
                        # escape html
                        $diff = encode_entities($diff);
                        # escape links and preprocessor stuff
index 645b2388be1b54ee15042b8abede429488bcadee..2df2c1317016a51aa6147a614f732c77295f5483 100644 (file)
@@ -147,3 +147,15 @@ short and clear as possible. --[[schmonz]]
 > that. --[[Joey]]
 
 >> Done. --[[schmonz]].
+
+----
+
+I'm attempting to bring some polish to this plugin, starting with
+fuller test coverage. In preparation, I've refactored the tests a
+bunch (and shuffled the code a bit) in my branch. I'm worried,
+however, that my misunderstanding of `git rebase` may have made my
+branch harder for you to pull.
+
+Before I go writing a whole swack of test cases, could you merge
+my latest? Through at least ad0e56cdcaaf76bc68d1b5c56e6845307b51c44a
+there should be no functional change. --[[schmonz]]
diff --git a/doc/sandbox/Test_it.mdwn b/doc/sandbox/Test_it.mdwn
new file mode 100644 (file)
index 0000000..5478d7a
--- /dev/null
@@ -0,0 +1 @@
+Test it just now!