Skip to content

Commit

Permalink
Workaround for gh-16
Browse files Browse the repository at this point in the history
  • Loading branch information
viklund committed Jun 13, 2009
1 parent 0d7a94e commit 8caf930
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/November.pm
Expand Up @@ -66,10 +66,12 @@ class November does Session does Cache {
else {
my $markup = $.config.markup;

$content = $markup.format($.storage.read_page( $page ),
link_maker => { self.make_link($^p, $^t) },
extlink_maker => { self.make_extlink($^p, $^t)
});
$content = $markup.format(
# MediaWiki markup can't handle trailing spaces, gh-16
$.storage.read_page( $page ).subst(/[\s|\n]+$/, ''),
link_maker => { self.make_link($^p, $^t) },
extlink_maker => { self.make_extlink($^p, $^t)}
);

self.set-cache-entry( $page, $content );
}
Expand Down Expand Up @@ -144,10 +146,12 @@ class November does Session does Cache {

my $markup = $.config.markup;

my $content = $markup.format($new_text,
link_maker => { self.make_link($^p, $^t) },
extlink_maker => { self.make_extlink($^p, $^t)
});
my $content = $markup.format(
# MediaWiki markup can't handle trailing spaces, gh-16
$new_text.subst(/[\s|\n]+$/, ''),
link_maker => { self.make_link($^p, $^t) },
extlink_maker => { self.make_extlink($^p, $^t)}
);

# Should really use the $tags parameter here, this will do for now...
#my $t = Tags.new();
Expand Down

0 comments on commit 8caf930

Please sign in to comment.