]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
make links dependencies fire if broken links change
[ikiwiki.git] / IkiWiki.pm
index c1d07531ee3488ba15f317ca84045adcd1c46d5d..b895e12fc0a924fac01a6ef1b10d58e02dbdb003 100644 (file)
@@ -31,6 +31,7 @@ our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
 # Page dependency types.
 our $DEPEND_CONTENT=1;
 our $DEPEND_PRESENCE=2;
+our $DEPEND_LINKS=4;
 
 # Optimisation.
 use Memoize;
@@ -1786,8 +1787,10 @@ sub add_depends ($$;@) {
                        $limited = $1 =~ /^(glob|internal|creation_month|creation_day|creation_year|created_before|created_after)$/;
                }
 
-               $deptype=$deptype & ~$DEPEND_CONTENT & $DEPEND_PRESENCE
+               $deptype=$deptype & ~$DEPEND_CONTENT | $DEPEND_PRESENCE
                        if $params{presence} && $limited;
+               $deptype=$deptype & ~$DEPEND_CONTENT | $DEPEND_LINKS
+                       if $params{links} && $limited;
        }
 
        if ($simple) {
@@ -1901,7 +1904,7 @@ sub pagespec_translate ($) {
                        [^\s()]+        # any other text
                )
                \s*             # ignore whitespace
-       }igx) {
+       }gx) {
                my $word=$1;
                if (lc $word eq 'and') {
                        $code.=' &&';