diff options
-rw-r--r-- | includes/SimpleMustache.h | 4 | ||||
-rw-r--r-- | src/SimpleMustache.cc | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/includes/SimpleMustache.h b/includes/SimpleMustache.h index 5b9dc3d..7bf0342 100644 --- a/includes/SimpleMustache.h +++ b/includes/SimpleMustache.h @@ -28,6 +28,10 @@ class SimpleMustache { ~Context() { empty(); } Proxy operator[](ssize_t idx) { ensureList(); return Proxy(this, idx); } Context & operator[](const char * str); + // we should try and support lambdas, but I'm not entierely sure about them. + // Something tells me they need some design love, especially about which + // context they use. The specification says they should expand the tags, + // but the example doesn't show a function that'd take a context... Context & operator=(const char * str) { empty(); m_type = STRING; diff --git a/src/SimpleMustache.cc b/src/SimpleMustache.cc index e87d08d..a7b2c45 100644 --- a/src/SimpleMustache.cc +++ b/src/SimpleMustache.cc @@ -270,6 +270,9 @@ void Balau::SimpleMustache::setTemplate(IO<Handle> _h) { curFragment->type = Fragment::NOESCAPE; break; case ENDSECTION: + // note: it'd be a nice optimization here to remember and find the + // locations of the start section, so to point the start section + // at its end, to avoid useless loops in the renderer. curFragment->type = Fragment::END_SECTION; break; case INVERTED: |