aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2012-01-24 02:40:43 -0500
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2012-01-24 02:40:43 -0500
commit873c404f144c37adb1c9121b35dc372d5934ebbf (patch)
tree7f50889f82a61a7a9217efdf3cd55838590b9d3a
parenta64b224f524bcef95fc3befeb3e66a854f9e3bff (diff)
parentbfda13f16c3a055b30d7e5448dd6640a12898adc (diff)
downloadikiwiki-873c404f144c37adb1c9121b35dc372d5934ebbf.tar
ikiwiki-873c404f144c37adb1c9121b35dc372d5934ebbf.tar.gz
Merge branch 'master' of git://git.ikiwiki.info into cvs
-rw-r--r--IkiWiki/Plugin/mdwn.pm2
-rw-r--r--IkiWiki/Plugin/recentchangesdiff.pm12
-rw-r--r--doc/rcs/cvs/discussion.mdwn12
-rw-r--r--doc/sandbox/Test_it.mdwn1
4 files changed, 24 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index 3c3fc9579..430194bff 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -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 {
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm
index 71297572d..418822793 100644
--- a/IkiWiki/Plugin/recentchangesdiff.pm
+++ b/IkiWiki/Plugin/recentchangesdiff.pm
@@ -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
diff --git a/doc/rcs/cvs/discussion.mdwn b/doc/rcs/cvs/discussion.mdwn
index 645b2388b..2df2c1317 100644
--- a/doc/rcs/cvs/discussion.mdwn
+++ b/doc/rcs/cvs/discussion.mdwn
@@ -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
index 000000000..5478d7a67
--- /dev/null
+++ b/doc/sandbox/Test_it.mdwn
@@ -0,0 +1 @@
+Test it just now!