put preprocess loop errors inside an error span
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 21:53:03 +0000 (17:53 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 21:53:03 +0000 (17:53 -0400)
IkiWiki.pm

index 01e7cc1e4c1febee4d84209c281e84a78deb7198..3f8a4bca334debb8a5728b25b258dac50c112f89 100644 (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) {