Permalink
Browse files

adds support for more template caching options

* changes regex in engineFor to exclude query / fragment
  • Loading branch information...
1 parent ad6ea24 commit d4f419e7f0a0299b3409fe481f2e6f7a19aaf14a Bryan Woods, Conner Peirce & Matt Vermaak committed with quirkey Feb 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sammy.js
View
@@ -1687,7 +1687,7 @@
if (_isFunction(engine)) { return engine; }
// lookup engine name by path extension
engine = (engine || context.app.template_engine).toString();
- if ((engine_match = engine.match(/\.([^\.]+)$/))) {
+ if ((engine_match = engine.match(/\.([^\.\?\#]+)/))) {
engine = engine_match[1];
}
// set the engine to the default template engine if no match is found

0 comments on commit d4f419e

Please sign in to comment.