Permalink
Browse files

No more trailing whitespace (this time for sure)

  • Loading branch information...
AlexDaniel committed Apr 16, 2015
1 parent c7bd561 commit 7112f1c170dfb49f002330fc89cd112ce0efa5e5
Showing with 29 additions and 29 deletions.
  1. +2 −2 modules/edit-paragraphs.pl
  2. +3 −3 modules/footnotes.pl
  3. +1 −1 modules/latex.pl
  4. +3 −3 modules/linktagmap.pl
  5. +10 −10 modules/tagmap.pl
  6. +10 −10 modules/thumbs.pl
@@ -51,7 +51,7 @@ sub DoEditParagraph {
} else {
$text = $Page{text};
}
my $done;
if ($around) {
# The tricky part is that the numbers refer to the HTML quoted text. What a pain.
@@ -189,7 +189,7 @@ sub EditParagraph {
# <table><tr><td>...</td></tr></table><p><a ...>&#x270E;</a></p>
# What we want, I guess, is this:
# <table><tr><td>...<a ...>&#x270E;</a></td></tr></table></p>
$pos = $pos || length(QuoteHtml($Page{text})); # make sure we have an around value
my $title = UrlEncode($OpenPageName);
my $paragraph = UrlEncode(UnquoteHtml($text));
View
@@ -179,7 +179,7 @@ =head3 REFERENCING ANOTHER FOOTNOTE
footnote definition a unique number, beginning at "1". Thus, this markup allows
you to reference one footnote definition in multiple places throughout a page.
As example, you might write:
History suggests that societal decline does not result from a single cause,
but rather the confluence of several interwoven causes.((Diamond, Jared. 2005.
**Collapse: How Societies Choose to Fail or Succeed.** %%Viking, New York.%%))
@@ -193,7 +193,7 @@ =head3 REFERENCING ANOTHER FOOTNOTE
The final footnote, above, is a reference to the first footnote definition
rather than a new footnote definition.
=head3 REFERENCING A RANGE OF OTHER FOOTNOTES
footnotes also handles marking resembling:
@@ -222,7 +222,7 @@ =head3 REFERENCING A RANGE OF OTHER FOOTNOTES
The final footnotes, above, are a reference to the first two footnote
definitions followed by a reference to the fourth footnote definition. This
module visually renders this disjoint list like: "1-2, 4".
=head3 CREATING THE SET OF FOOTNOTES
footnotes also handles markup resembling:
View
@@ -195,7 +195,7 @@ sub MakeLaTeX {
$output = qx($dvipngPath -T tight -bg Transparent srender.dvi);
$error = "[dvipng error $? ($output)]" if $?;
}
if (not $error and -f 'srender1.png' and not -z 'srender1.png') {
my $png = ReadFileOrDie("srender1.png");
WriteStringToFile ("$LatexDir/$hash.png", $png);
View
@@ -89,15 +89,15 @@ sub DoLinkTagMap {
}
sub DoLinkTagSearch {
my $searchedtag = GetParam('linktag'); # get tag parameter
my $header = Ts($LinkTagSearchTitle, $searchedtag); # modify page title with requested tag
print GetHeader('',$header,''); # print title
print '<div class="content">';
my $SearchResult = GenerateLinkSearchResult($searchedtag);
print $SearchResult;
print '</div>';
PrintFooter();
@@ -181,7 +181,7 @@ sub PrintLinkTagMap {
<tag[ ]title="(.*?)">
}{
my $tag = $1;
"<li id=\"$tag\">$tag</li>\n<ul>";
}xsge;
View
@@ -67,24 +67,24 @@ sub DoTagSearch {
print GetHeader('',$header,''); # print title
print '<div class="content">';
my $SearchResult = GenerateSearchResult($searchedtag);
print $SearchResult;
print '</div>';
PrintFooter();
}
sub GenerateSearchResult {
my $searchedtag = shift @_;
my @pages = AllPagesList();
local %Page;
local $OpenPageName='';
my $SearchResult .= "<ul>";
foreach my $page (@pages) {
@@ -130,11 +130,11 @@ sub CreateTagMap {
OpenPage($page);
my @tags = GetTags($Page{text});
$page = FreeToNormal($page);
my $count = @tags;
if ($count != 0) {
$TagXML .= "<object><id>$page</id>\n";
foreach (@tags) {
$TagXML .= "<tag>$_</tag>";
$TagList{$_} = 1;
@@ -158,7 +158,7 @@ sub PrintTagMap {
<tag[ ]title="(.*?)">
}{
my $tag = $1;
"<li>$tag</li>\n<ul>";
}xsge;
@@ -171,7 +171,7 @@ sub PrintTagMap {
$name =~ s/_/ /g;
"<li><a href=\"$ScriptName\/$id\">$name</a></li>";
}xsge;
print $result;
print $result;
}
sub GetTags {
View
@@ -96,7 +96,7 @@ sub ThumbNailSupportRule {
AllPagesList();
# if the page does exists
if ($IndexHash{$id})
{
@@ -106,11 +106,11 @@ sub ThumbNailSupportRule {
GenerateThumbNail ($id, $size);
}
my %img_attribs;
my $action = "$ThumbnailCacheUrl/" . UrlEncode($id) . "/$size";
$img_attribs{'-src'} = $action;
if (defined $comment) {
@@ -127,7 +127,7 @@ sub ThumbNailSupportRule {
if (defined $frame) {
if (defined $comment) { $result = $result . $q->div({-class=>'thumbcaption'}, "$comment"); }
if ($size>0) {
$result = $q->div({-style=>"width:" . ($size+2) . "px"}, $result);
$result = $q->div({-class=>"thumb " . $alignment_framed}, $result);
@@ -150,12 +150,12 @@ sub ThumbNailSupportRule {
{
Dirty($RawMatch);
print $result;
$result = '';
}
return $result;
}
@@ -175,14 +175,14 @@ sub GenerateThumbNail {
ValidIdOrDie($id);
AllPagesList();
if (not $IndexHash{$id}) { ReportError(Ts('Error creating thumbnail from non existant page %s.' , $id), '500 INTERNAL SERVER ERROR'); } # Page Doesn't exist,
my $openpage = $OpenPageName; # remember the current page we are on
RequestLockOrError();
RequestLockOrError();
OpenPage($id);
# Parse out some data
@@ -211,7 +211,7 @@ sub GenerateThumbNail {
# Decode the original image to a temp file
open(FD, "> $filename") or ReportError(Ts("Could not open %s for writing whilst trying to save image before creating thumbnail. Check write permissions.",$filename), '500 INTERNAL SERVER ERROR');
open(FD, "> $filename") or ReportError(Ts("Could not open %s for writing whilst trying to save image before creating thumbnail. Check write permissions.",$filename), '500 INTERNAL SERVER ERROR');
binmode(FD);
print FD MIME::Base64::decode($data);
close(FD);
@@ -253,7 +253,7 @@ sub GenerateThumbNail {
# save tag to page
#$Page{'thumbnail_' . $size} = '#FILE ' . $type . ' created=' . $Now . ' revision=' . $Page{'revision'} . ' size=' . $scaled_size_x . 'x' . $scaled_size_y . "\n" . $thumbnail_data;
#SavePage();
ReleaseLock();
OpenPage($openpage); # restore original open page

0 comments on commit 7112f1c

Please sign in to comment.