The Wakaba and Kareha support thread, part 3 (535)

281 Name: Anonymous : 2012-10-02 00:50 ID:Heaven [Del]

>>280
Find sub include($) in wakautils.pl, and change the whole block to something like this:

sub include($;$)
{
my ($filename,$nostrip)=@_;

open FILE,$filename or return '';
my $file=do { local $/; <FILE> };

unless($nostrip)
{
$file=~s/^\s+//;
$file=~s/\s+$//;
$file=~s/\n\s*/ /sg;
}

return $file;
}

Then use something like include("file.html", 1) in the templates. The second argument will tell it to not strip whitespace.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: