From bf386e22f5fb65999c38668cb011bdf4ae26d72c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 1 Oct 2008 17:29:03 -0400 Subject: inline: Fix handling of rootpage that doesn't exist. It makes sense to use bestlink to determine which page rootpage refers to, but if no page matches, just use the raw value. --- IkiWiki/Plugin/inline.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index e0f33ef31..5d2ef5681 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -266,6 +266,9 @@ sub preprocess_inline (@) { #{{{ my $rootpage; if (exists $params{rootpage}) { $rootpage=bestlink($params{page}, $params{rootpage}); + if (!length $rootpage) { + $rootpage=$params{rootpage}; + } } else { $rootpage=$params{page}; -- cgit v1.2.3