summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-14 00:11:19 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-14 00:11:19 +0000
commit6fc66f83deba6df8abdf4bc117f8da7efbd7cbc1 (patch)
treeb65261ec25063bea8fd8e8b4793917fea65768de
parent433832b020c6464938992293c15cc8cdcfbd18f7 (diff)
* 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.
-rw-r--r--IkiWiki/Plugin/conditional.pm3
-rw-r--r--IkiWiki/Plugin/smiley.pm4
-rw-r--r--IkiWiki/Plugin/template.pm3
-rw-r--r--IkiWiki/Plugin/toggle.pm3
-rw-r--r--debian/changelog6
-rw-r--r--doc/todo/smileys_do_not_work_in_PreprocessorDirective_arguments.mdwn4
-rw-r--r--po/es.po21
-rw-r--r--po/ikiwiki.pot2
8 files changed, 30 insertions, 16 deletions
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
index 35418a3ba..293fbc191 100644
--- a/IkiWiki/Plugin/conditional.pm
+++ b/IkiWiki/Plugin/conditional.pm
@@ -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;
diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm
index 85a719337..45d00abea 100644
--- a/IkiWiki/Plugin/smiley.pm
+++ b/IkiWiki/Plugin/smiley.pm
@@ -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};
} # }}}
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm
index 23d9d65d8..16a3c1e37 100644
--- a/IkiWiki/Plugin/template.pm
+++ b/IkiWiki/Plugin/template.pm
@@ -50,7 +50,8 @@ sub preprocess (@) { #{{{
}
return IkiWiki::preprocess($params{page}, $params{destpage},
- $template->output);
+ IkiWiki::filter($params{page},
+ $template->output));
} # }}}
1
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index c68e30892..7318731c5 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -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});
diff --git a/debian/changelog b/debian/changelog
index d77b97dcd..80a47c458 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/todo/smileys_do_not_work_in_PreprocessorDirective_arguments.mdwn b/doc/todo/smileys_do_not_work_in_PreprocessorDirective_arguments.mdwn
index 3f327820e..dabc58dee 100644
--- a/doc/todo/smileys_do_not_work_in_PreprocessorDirective_arguments.mdwn
+++ b/doc/todo/smileys_do_not_work_in_PreprocessorDirective_arguments.mdwn
@@ -13,4 +13,6 @@ after [[PreprocessorDirective]]s.
>
> Also, for an example of this issue, consider the sample conditional on [[plugins/conditional]].
>
-> --[[JoshTriplett]] \ No newline at end of file
+> --[[JoshTriplett]]
+
+[[todo/done]] --[[Joey]]
diff --git a/po/es.po b/po/es.po
index 5a541c672..b39851725 100644
--- a/po/es.po
+++ b/po/es.po
@@ -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"
-
diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot
index 90ff014b6..fd29aba17 100644
--- a/po/ikiwiki.pot
+++ b/po/ikiwiki.pot
@@ -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"