aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-12 13:41:21 -0500
committerJoey Hess <joey@kitenet.net>2007-12-12 13:41:21 -0500
commitc06643a43555ba9d2a24b1177c2c9f68cf994432 (patch)
tree4103bbf728d6cb43cb587b401a83f1f556bf01b9 /IkiWiki
parentfe0c0b6fc38b94295e803685c4931cb5977744b7 (diff)
downloadikiwiki-c06643a43555ba9d2a24b1177c2c9f68cf994432.tar
ikiwiki-c06643a43555ba9d2a24b1177c2c9f68cf994432.tar.gz
* Ensure that web edited pages always end in a newline.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 567fa85be..33e670eac 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -552,6 +552,7 @@ sub cgi_editpage ($$) { #{{{
});
$content=~s/\r\n/\n/g;
$content=~s/\r/\n/g;
+ $content.="\n" if $content !~ /\n$/;
$config{cgi}=0; # avoid cgi error message
eval { writefile($file, $config{srcdir}, $content) };