diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-09-30 15:16:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-09-30 15:16:45 -0400 |
commit | 4a2b401fd05806c9faaf160b3046a17caca7dbd2 (patch) | |
tree | 81b08c74684632be1bad83599f23e40bfda91f5a /doc/bugs | |
parent | 3ef2824350a37a562df6394b801e8006eac22626 (diff) | |
download | ikiwiki-4a2b401fd05806c9faaf160b3046a17caca7dbd2.tar ikiwiki-4a2b401fd05806c9faaf160b3046a17caca7dbd2.tar.gz |
interesting bug
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn b/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn new file mode 100644 index 000000000..012fcec2c --- /dev/null +++ b/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn @@ -0,0 +1,23 @@ +A [[PageSpec]] that is entirely negated terminals, such as "!foo and !bar" +matches all other pages, including all internal pages. This can lead to +unexpected results, since it will match a bunch of recentchanges pages, +etc. + +Recall that internal-use pages are not matched by a glob. So "*" doesn't +match them. So if the pagespec is "* and !foo and !bar", it won't match +them. This is the much more common style. + +There's an odd inconsistency with entirely negated pagespecs. If "!foo" +matches page bar, shouldn't "" also match bar? But, the empty pagespec is +actually special-cased to not match anything. + +Indeed, it seems what would be best would be for "!foo" to not match any +pages, unless it's combined with a terminal that positively matches pages +("* and !foo"). Although this would be a behavior change, with transition +issues. + +Another approach would be to try to detect the case of an entirely negated +pagespec, and implicitly add "and !internal()" to it. + +Either approach would require fully parsing the pagespec. And consider cases +like "!(foo and !bar)". Doesn't seem at all easy to solve. --[[Joey]] |