From d9062864ee7ad8248ad41c0b1cd17ec5f2f4dafc Mon Sep 17 00:00:00 2001 From: Gabriel McManus Date: Sun, 20 Jul 2008 17:40:16 +1000 Subject: Rebuild pages that change their type. Previously, if a page changed its type but not its mtime (e.g. mv page.txt page.mdwn), then it would not be rebuilt. Now, check if the source of a page has changed, in which case force a rebuild of that page. (cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843) --- IkiWiki/Render.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index ab3ccd7ae..90058199c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -319,6 +319,10 @@ sub refresh () { #{{{ # check for added or removed pages foreach my $file (@files) { my $page=pagename($file); + if (exists $pagesources{$page} && $pagesources{$page} ne $file) { + # the page has changed its type + $forcerebuild{$page}=1; + } $pagesources{$page}=$file; if (! $pagemtime{$page}) { if (isinternal($page)) { -- cgit v1.2.3