I received an exception that "page is prohibited by "nobots" or "bots|allow=none" template" when attempting to edit a page that only used nobots inside of <nowiki> ... </nowiki> tags.
If someone uses the bots or nobots template inside of ... , <nowiki> ... </nowiki>,
..., or HTML comments, then it should be ignored.
I also treat {{deceased wikipedian}} just like a {{nobots}}.
I am not very good at all with regex, so I am sure someone who knows what they are doing could do a better job of this, but I built my own function (source at https://en.wikipedia.org/wiki/User:B-bot/source ) that you are welcome to use or adapt for a future version of your framework.
Someone who knows Regex might be able to combine all of my rules together and do this whole thing in a few lines of code.
You're probably right, commented out templates should be ignored. But at the moment finding and stripping all the comments and formatting tags is what I would prefer not to do before saving every page. It's too much processor work for such rare situations. May be sometimes later.
As an alternative, would you consider adding a property "ignorenobots" or an event CanEditPage that the consumer can handle with their own nobots check? I have just commented out the relevant code in the Save function and then I call my own code before even calling Save ... though I'm not thrilled with custom changes to the library for obvious reasons (being cut off from upgrades, etc)