Skip to content

Commit

Permalink
Fix multiple render.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed May 29, 2016
1 parent b94c2b9 commit fcb312a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions doc/lib/BackRestDoc/Html/DocHtmlSite.pm
Expand Up @@ -122,10 +122,13 @@ sub process
{
&log(INFO, " render out: ${strPageId}");

my $strHtml;

eval
{
$self->{oManifest}->variableReplace(
(new BackRestDoc::Html::DocHtmlPage($self->{oManifest}, $strPageId, $self->{bExe}))->process());
$strHtml =
$self->{oManifest}->variableReplace(
(new BackRestDoc::Html::DocHtmlPage($self->{oManifest}, $strPageId, $self->{bExe}))->process());
};

if ($@)
Expand All @@ -137,16 +140,15 @@ sub process
{
my $oRenderOut = $self->{oManifest}->renderOutGet(RENDER_TYPE_HTML, $strPageId);
$self->{oManifest}->cacheReset($$oRenderOut{source});
$self->{oManifest}->variableReplace(
(new BackRestDoc::Html::DocHtmlPage($self->{oManifest}, $strPageId, $self->{bExe}))->process());

$strHtml =
$self->{oManifest}->variableReplace(
(new BackRestDoc::Html::DocHtmlPage($self->{oManifest}, $strPageId, $self->{bExe}))->process());
}
}

# Save the html page
fileStringWrite("$self->{strHtmlPath}/${strPageId}.html",
$self->{oManifest}->variableReplace((new BackRestDoc::Html::DocHtmlPage($self->{oManifest},
$strPageId, $self->{bExe}))->process()),
false);
fileStringWrite("$self->{strHtmlPath}/${strPageId}.html", $strHtml, false);
}

# Return from function and log return values if any
Expand Down

0 comments on commit fcb312a

Please sign in to comment.