put preprocess loop errors inside an error span

master
Joey Hess 2008-07-26 17:53:03 -04:00
parent 8a45362d55
commit e829930008
1 changed files with 4 additions and 7 deletions

View File

@ -764,13 +764,10 @@ sub preprocess ($$$;$$) { #{{{
if ($preprocessing{$page}++ > 3) {
# Avoid loops of preprocessed pages preprocessing
# other pages that preprocess them, etc.
#translators: The first parameter is a
#translators: preprocessor directive name,
#translators: the second a page name, the
#translators: third a number.
return "[[".sprintf(gettext("%s preprocessing loop detected on %s at depth %i"),
$command, $page, $preprocessing{$page}).
"]]";
return "[[!$command <span class=\"error\">".
sprintf(gettext("preprocessing loop detected on %s at depth %i"),
$page, $preprocessing{$page}).
"</span>]]";
}
my $ret;
if (! $scan) {