* Fix the template, toggle, and conditional plugins to filter text before

preprocessing it.
* Fix smiley plugin to support smileys at the very beginning or end of
  the content.
master
joey 2007-02-14 00:11:19 +00:00
parent 433832b020
commit 6fc66f83de
8 changed files with 30 additions and 16 deletions

View File

@ -53,7 +53,8 @@ sub preprocess_if (@) { #{{{
else {
$ret="";
}
return IkiWiki::preprocess($params{page}, $params{destpage}, $ret);
return IkiWiki::preprocess($params{page}, $params{destpage},
IkiWiki::filter($params{page}, $ret));
} # }}}
package IkiWiki::PageSpec;

View File

@ -34,10 +34,10 @@ sub setup () { #{{{
sub filter (@) { #{{{
my %params=@_;
$params{content} =~ s{(?<=\s)(\\?)$smiley_regexp(?=\s)}{
$params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{
$1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, 0, 0, $2)
}egs;
return $params{content};
} # }}}

View File

@ -50,7 +50,8 @@ sub preprocess (@) { #{{{
}
return IkiWiki::preprocess($params{page}, $params{destpage},
$template->output);
IkiWiki::filter($params{page},
$template->output));
} # }}}
1

View File

@ -88,7 +88,8 @@ sub preprocess_toggleable (@) { #{{{
# Preprocess the text to expand any preprocessor directives
# embedded inside it.
$params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, $params{text});
$params{text}=IkiWiki::preprocess($params{page}, $params{destpage},
IkiWiki::filter($params{page}, $params{text}));
my $id=genid($params{page}, $params{id});

6
debian/changelog vendored
View File

@ -11,8 +11,12 @@ ikiwiki (1.43) UNRELEASED; urgency=low
* Make the basewiki be full of symlinks to pages that should be the same
in the doc wiki. This will allow direct edits to alter the base wiki
without manual munging.
* Fix the template, toggle, and conditional plugins to filter text before
preprocessing it.
* Fix smiley plugin to support smileys at the very beginning or end of
the content.
-- Joey Hess <joeyh@debian.org> Tue, 13 Feb 2007 18:06:02 -0500
-- Joey Hess <joeyh@debian.org> Tue, 13 Feb 2007 18:40:36 -0500
ikiwiki (1.42) unstable; urgency=low

View File

@ -13,4 +13,6 @@ after [[PreprocessorDirective]]s.
>
> Also, for an example of this issue, consider the sample conditional on [[plugins/conditional]].
>
> --[[JoshTriplett]]
> --[[JoshTriplett]]
[[todo/done]] --[[Joey]]

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: es\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-11 22:01-0500\n"
"POT-Creation-Date: 2007-02-13 18:43-0500\n"
"PO-Revision-Date: 2007-02-12 10:31+0100\n"
"Last-Translator: Víctor Moral <victor@taquiones.net>\n"
"Language-Team: spanish <es@li.org>\n"
@ -52,7 +52,9 @@ msgstr "Ha sido expulsado."
#: ../IkiWiki/CGI.pm:660
msgid "login failed, perhaps you need to turn on cookies?"
msgstr "registro fallido, ¿ tal vez es necesario activar las cookies en el navegador ?"
msgstr ""
"registro fallido, ¿ tal vez es necesario activar las cookies en el "
"navegador ?"
#: ../IkiWiki/Plugin/aggregate.pm:61
#, perl-format
@ -115,7 +117,8 @@ msgstr "el programa fortune ha fallado"
#: ../IkiWiki/Plugin/googlecalendar.pm:22
msgid "googlecalendar failed to find url in html"
msgstr "El complemento googlecalendar no ha encontrado un URL en el código HTML"
msgstr ""
"El complemento googlecalendar no ha encontrado un URL en el código HTML"
#: ../IkiWiki/Plugin/inline.pm:36
msgid "Must specify url to wiki with --url when using --rss or --atom"
@ -295,7 +298,9 @@ msgstr "convirtiendo la página %s, la cual depende de %s"
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "convirtiendo la página %s para actualizar la lista de páginas que hacen referencia a ella."
msgstr ""
"convirtiendo la página %s para actualizar la lista de páginas que hacen "
"referencia a ella."
#: ../IkiWiki/Render.pm:414
#, perl-format
@ -346,7 +351,8 @@ msgstr "el programa %s no parece ser ejecutable"
#: ../IkiWiki/Wrapper.pm:20
msgid "cannot create a wrapper that uses a setup file"
msgstr "no puedo crear un programa envoltorio que utiliza un archivo de configuración"
msgstr ""
"no puedo crear un programa envoltorio que utiliza un archivo de configuración"
#: ../IkiWiki/Wrapper.pm:24
msgid "wrapper filename not specified"
@ -378,8 +384,8 @@ msgstr "uso: ikiwiki [opciones] origen destino"
#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Es obligatorio especificar un url al wiki con el parámetro --url si se utiliza "
"el parámetro --cgi"
"Es obligatorio especificar un url al wiki con el parámetro --url si se "
"utiliza el parámetro --cgi"
#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
@ -395,4 +401,3 @@ msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
"se ha detectado un bucle de preprocesado %s en la página %s en la vuelta "
"número %i"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-11 22:01-0500\n"
"POT-Creation-Date: 2007-02-13 19:10-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"