Last modified: 2011-03-13 18:06:01 UTC
Currently (r37973) when __INDEX__ and __NOINDEX__ both occur on the page, the page is indexable, regardless of the order or the number of times they appear. This is because in line 3386 of Parser.php, I only check whether $this->mDoubleUnderscores has the appropriate indexes. By this point we don't know which one came first. It wasn't immediately obvious to me how best to fix it -- how do __NOTOC__ and __FORCETOC__ work? It's not a big thing, so I figured it didn't need to block the new feature.
I'm not sure why you think this is worth doing. The resulting code would be quite a bit more complicated.
It seems to me that the current way of doing it is less intuitive. I would certainly expect the last one in the page to win. If it's complicated to do this with our current setup (and you would know that better than I), I guess it's not worth doing in the foreseeable future. It seems __NOTOC__ and __FORCETOC__ work the same, at a glance, with __FORCETOC__ always overriding __NOTOC__. It would be nice if some mechanism could be added to get this to work more nicely, but there are probably better things to do, yeah. Don't see any reason to close the bug, though.