Skip to content

Commit e9af549

Browse files
committed
Merge pull request janl#166 from eric-brechemier/maintenance
0.4.x Maintenance
2 parents 3f15f72 + e94a477 commit e9af549

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# mustache.js Changes
22

3+
## 0.4.1-dev (2/15/2012)
4+
5+
* fixed greedy parsing of section name in regexp
6+
7+
## 0.4.0 (1/4/2012)
8+
39
## 0.3.1-dev-twitter-b (8/23/2011)
410

511
* Cached regexes for improved performance

mustache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var Mustache = function () {
4040
"<": "&lt;",
4141
">": "&gt;",
4242
'"': '&quot;',
43-
"'": '&#39;'
43+
"'": '&apos;'
4444
};
4545

4646
function escapeHTML(string) {
@@ -176,7 +176,7 @@ var Mustache = function () {
176176
"^([\\s\\S]*?)" + // all the crap at the beginning that is not {{*}} ($1)
177177

178178
otag + // {{
179-
"(\\^|\\#)\\s*(.+)\\s*" + // #foo (# == $2, foo == $3)
179+
"(\\^|\\#)\\s*(.+?)\\s*" +// #foo (# == $2, foo == $3), not greedy
180180
ctag + // }}
181181

182182
"\n*([\\s\\S]*?)" + // between the tag ($2). leading newlines are dropped
@@ -417,7 +417,7 @@ var Mustache = function () {
417417

418418
return({
419419
name: "mustache.js",
420-
version: "0.4.0",
420+
version: "0.4.1-dev",
421421

422422
/*
423423
Turns a template and view into HTML

0 commit comments

Comments
 (0)