diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-03-02 02:29:29 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-03-02 02:29:29 +0000 |
commit | 50b2e080e021752c9c5933fca770fbead5711e78 (patch) | |
tree | 528ee709dc40d17d0cc6209d929d0acb727f53bf /doc | |
parent | d87413bf3667badf9a3b5afc1d5cb161bb53e243 (diff) | |
download | ikiwiki-50b2e080e021752c9c5933fca770fbead5711e78.tar ikiwiki-50b2e080e021752c9c5933fca770fbead5711e78.tar.gz |
web commit by http://ethan.betacantrips.com/: updated patch
Diffstat (limited to 'doc')
-rw-r--r-- | doc/patchqueue/format_escape.mdwn | 48 |
1 files changed, 19 insertions, 29 deletions
diff --git a/doc/patchqueue/format_escape.mdwn b/doc/patchqueue/format_escape.mdwn index 41666b6e2..7d96d762f 100644 --- a/doc/patchqueue/format_escape.mdwn +++ b/doc/patchqueue/format_escape.mdwn @@ -11,26 +11,12 @@ Seems fairly reasonable, actually. Shouldn't the `$type` come from `$page` instead of `$destpage` though? Only other obvious change is to make the escape parameter optional, and only call it if set. --[[Joey]] -<pre> -diff -urX ignorepats clean-ikidev/IkiWiki/Plugin/mdwn.pm ikidev/IkiWiki/Plugin/mdwn.pm ---- clean-ikidev/IkiWiki/Plugin/mdwn.pm 2007-02-25 12:26:54.031200000 -0800 -+++ ikidev/IkiWiki/Plugin/mdwn.pm 2007-02-27 21:26:43.556095000 -0800 -@@ -7,7 +7,12 @@ - use IkiWiki; +> I couldn't figure out what to make it from, but thinking it through, +> yeah, it should be $page. Revised patch follows. --Ethan - sub import { #{{{ -- hook(type => "htmlize", id => "mdwn", call => \&htmlize); -+ hook(type => "htmlize", id => "mdwn", call => \&htmlize, escape => \&escape); -+} # }}} -+ -+sub escape ($) { #{{{ -+ my $html = shift; -+ return $html; - } # }}} - - my $markdown_sub; -diff -urX ignorepats clean-ikidev/IkiWiki/Plugin/rst.pm ikidev/IkiWiki/Plugin/rst.pm ---- clean-ikidev/IkiWiki/Plugin/rst.pm 2007-02-25 12:26:54.501830000 -0800 +<pre> +diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/rst.pm ikidev/IkiWiki/Plugin/rst.pm +--- ikiwiki/IkiWiki/Plugin/rst.pm 2006-09-25 14:30:40.000000000 -0700 +++ ikidev/IkiWiki/Plugin/rst.pm 2007-02-27 22:44:11.040042000 -0800 @@ -25,13 +25,19 @@ html = publish_string(stdin.read(), writer_name='html', @@ -54,8 +40,8 @@ diff -urX ignorepats clean-ikidev/IkiWiki/Plugin/rst.pm ikidev/IkiWiki/Plugin/rs } # }}} sub htmlize (@) { #{{{ -diff -urX ignorepats clean-ikidev/IkiWiki/Plugin/shortcut.pm ikidev/IkiWiki/Plugin/shortcut.pm ---- clean-ikidev/IkiWiki/Plugin/shortcut.pm 2007-02-25 12:26:54.538830000 -0800 +diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/shortcut.pm ikidev/IkiWiki/Plugin/shortcut.pm +--- ikiwiki/IkiWiki/Plugin/shortcut.pm 2007-02-15 00:38:48.000000000 -0800 +++ ikidev/IkiWiki/Plugin/shortcut.pm 2007-02-27 22:09:31.536088000 -0800 @@ -13,6 +13,7 @@ sub checkconfig () { #{{{ @@ -65,18 +51,22 @@ diff -urX ignorepats clean-ikidev/IkiWiki/Plugin/shortcut.pm ikidev/IkiWiki/Plug IkiWiki::preprocess("shortcuts", "shortcuts", readfile(srcfile("shortcuts.mdwn"))); } # }}} -diff -urX ignorepats clean-ikidev/IkiWiki.pm ikidev/IkiWiki.pm ---- clean-ikidev/IkiWiki.pm 2007-02-25 12:26:58.812850000 -0800 -+++ ikidev/IkiWiki.pm 2007-02-27 22:09:28.149568000 -0800 -@@ -568,6 +577,13 @@ +diff -urNX ignorepats ikiwiki/IkiWiki.pm ikidev/IkiWiki.pm +--- ikiwiki/IkiWiki.pm 2007-02-25 15:01:27.211170000 -0800 ++++ ikidev/IkiWiki.pm 2007-03-01 18:20:39.910925000 -0800 +@@ -580,6 +577,17 @@ destpage => $destpage, ); $preprocessing{$page}--; + if ($ret =~ /[<>]/){ -+ my $type=pagetype($pagesources{$destpage}); -+ $ret = $hooks{htmlize}{$type}{escape}->( -+ $ret, -+ ); ++ if ($pagesources{$page}) { ++ my $type=pagetype($pagesources{$page}); ++ if ($hooks{htmlize}{$type}{escape}) { ++ $ret = $hooks{htmlize}{$type}{escape}->( ++ $ret, ++ ); ++ } ++ } + } + return $ret; |