bobthecow/mustache.php — pull request #72 by zbuc (2012-01-13 20:39:31+00:00)
Title: Allow user to turn off UNKNOWN_PRAGMA checking

We were using your Mustache.php(good work) and had quite a few templates sitting around.

We wrote those templates a while back -- so they referenced some old pragmas, e.g. DOT-NOTATION and IMPLICIT-ITERATOR, that aren't valid any more.

We use the same Mustache templates in different languages and some of the other implementations require those pragmas -- so being able to turn off unknown pragma checking is important to us.

There was a _throwsException config option for the unknown pragma exception but it seems that when the exceptions are actually thrown, it's not being checked.

This patch seemed to work well for us.

I don't have a test for it -- I hacked it together quickly and have to get back to some other things but you can test the behavior by including an invalid pragma in a template with and without my patch.

Thanks!