Permalink
Browse files

Metacharacters inside character classes do not need to be escaped

  • Loading branch information...
1 parent 94bf84a commit 9efc0effc21193b51ded113c434dae1658ea4e90 @addyosmani committed Nov 7, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 microtemplatez.js
View
@@ -1,12 +1,12 @@
/*!
-* Compact micro-templating implementation
+* Microtemplatez - a compact micro-templating implementation
* Copyright: Addy Osmani, 2011.
-* Licensed under MIT/GPL licenses
+* Licensed under a dual-MIT/GPL license
*/
;( function ( window, doc, undef ) {
templatez = function( tmpl, data ) {
- return tmpl.replace((RegExp("{{\\s*([a-z0-9_][\\.a-z0-9_]*)\\s*}}", "gi")), function (tag, k) {
+ return tmpl.replace((RegExp("{{\\s*([a-z0-9_][.a-z0-9_]*)\\s*}}", "gi")), function (tag, k) {
var p = k.split("."),
len = p.length,
temp = data,

0 comments on commit 9efc0ef

Please sign in to comment.