diff options
author | Joey Hess <joey@kitenet.net> | 2007-12-12 16:42:54 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2007-12-12 16:42:54 -0500 |
commit | 7eafa95f33d4429054d13e6ade54d112c02ba0e1 (patch) | |
tree | 994e9e7c121b25edee247e6bcf44e6bbe739b0b9 | |
parent | b10c46a1f3b9fadfb3cf6f1129e748bfc742ea44 (diff) |
* Htmlize parameters passed to the template preprocessor directive before
inserting them into the html template. This ensures that markdown
acts on them, even if the value is expanded inside a block-level html
element in the html template. Closes: #454058
* Use a div in the note template rather than a span.
-rw-r--r-- | IkiWiki/Plugin/template.pm | 5 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | doc/templates/note.mdwn | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index c87ba5102..27e475ae5 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -49,9 +49,10 @@ sub preprocess (@) { #{{{ $template->param($param => $params{$param}); } - return IkiWiki::preprocess($params{page}, $params{destpage}, + return IkiWiki::htmlize($params{page}, pagetype($pagesources{$params{page}}), + IkiWiki::preprocess($params{page}, $params{destpage}, IkiWiki::filter($params{page}, $params{destpage}, - $template->output)); + $template->output))); } # }}} 1 diff --git a/debian/changelog b/debian/changelog index 8c8f4aa95..0df68b2fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,11 @@ ikiwiki (2.16) UNRELEASED; urgency=low cached value. * Preserve input file modification times in output files. * Allow dashes in preprocessor directive commands, and shortcuts. + * Htmlize parameters passed to the template preprocessor directive before + inserting them into the html template. This ensures that markdown + acts on them, even if the value is expanded inside a block-level html + element in the html template. Closes: #454058 + * Use a div in the note template rather than a span. -- Joey Hess <joeyh@debian.org> Mon, 03 Dec 2007 14:47:36 -0500 diff --git a/doc/templates/note.mdwn b/doc/templates/note.mdwn index d992e0236..4cc323c0e 100644 --- a/doc/templates/note.mdwn +++ b/doc/templates/note.mdwn @@ -1,6 +1,6 @@ -<span class="notebox"> +<div class="notebox"> <TMPL_VAR text> -</span> +</div> <TMPL_UNLESS NAME="text"> Use this template to insert a note into a page. The note will be styled to float to the right of other text on the page. This template has one |