浏览代码

Merge pull request #166 from eric-brechemier/maintenance

0.4.x Maintenance
tags/0.4.1
Jan Lehnardt 14 年前
父节点
当前提交
e9af5496e9
共有 2 个文件被更改,包括 9 次插入3 次删除
  1. +6
    -0
      CHANGES.md
  2. +3
    -3
      mustache.js

+ 6
- 0
CHANGES.md 查看文件

@@ -1,5 +1,11 @@
# mustache.js Changes

## 0.4.1-dev (2/15/2012)

* fixed greedy parsing of section name in regexp

## 0.4.0 (1/4/2012)

## 0.3.1-dev-twitter-b (8/23/2011)

* Cached regexes for improved performance


+ 3
- 3
mustache.js 查看文件

@@ -40,7 +40,7 @@ var Mustache = function () {
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;'
"'": '&apos;'
};

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

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

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

return({
name: "mustache.js",
version: "0.4.0",
version: "0.4.1-dev",

/*
Turns a template and view into HTML


正在加载...
取消
保存