Skip to content

Commit

Permalink
Fixed Regex expression to prevent some parsing errors where the
Browse files Browse the repository at this point in the history
opening paren was taken from one template tag, and the closing paren
from the next.
  • Loading branch information
BorisMoore authored and Boris Moore committed Sep 28, 2010
1 parent e2ebcc9 commit e0ab35e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
.replace( /([\\'])/g, "\\$1" )
.replace( /[\r\t\n]/g, " " )
.replace( /\$\{([^\}]*)\}/g, "{{= $1}}" )
.replace( /\{\{(\/?)(\w+|.)(?:\(((?:.(?!\}\}))*?)?\))?(?:\s+(.*?)?)?(\((.*?)\))?\s*\}\}/g,
.replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function( all, slash, type, fnargs, target, parens, args ) {
var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;
if ( !tag ) {
Expand Down

0 comments on commit e0ab35e

Please sign in to comment.