Skip to content

Commit 60dbb98

Browse files
committed
Merge branch 'pr/486'
Closes #486 Conflicts: src/templates/default.js
2 parents a331908 + 1f96a06 commit 60dbb98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/templates/default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
JSONEditor.defaults.templates["default"] = function() {
22
return {
33
compile: function(template) {
4-
var matches = template.match(/{{\s*([a-zA-Z0-9\-_\.]+)\s*}}/g);
4+
var matches = template.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g);
55
var l = matches && matches.length;
66

77
// Shortcut if the template contains no variables
@@ -11,7 +11,7 @@ JSONEditor.defaults.templates["default"] = function() {
1111
// This drastically speeds up template execution
1212
var replacements = [];
1313
var get_replacement = function(i) {
14-
var p = matches[i].replace(/[{}\s]+/g,'').split('.');
14+
var p = matches[i].replace(/[{}]+/g,'').trim().split('.');
1515
var n = p.length;
1616
var func;
1717

0 commit comments

Comments
 (0)