X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d6f9d7743167cb4b58f16f1e371585f09dc15a0b..295a08394f1f962459d26db06624ff5d17bc3008:/IkiWiki/Plugin/more.pm

diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm
index 80e339a1b..6880e366d 100644
--- a/IkiWiki/Plugin/more.pm
+++ b/IkiWiki/Plugin/more.pm
@@ -26,7 +26,10 @@ sub preprocess (@) {
 
 	$params{linktext} = $linktext unless defined $params{linktext};
 
-	if ($params{page} ne $params{destpage}) {
+	if ($params{page} ne $params{destpage} &&
+	    (! exists $params{pages} ||
+	     pagespec_match($params{destpage}, $params{pages},
+		     location => $params{page}))) {
 		return "\n".
 			htmllink($params{page}, $params{destpage}, $params{page},
 				linktext => $params{linktext},