Skip to content

Commit

Permalink
remove support for single braces
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 7, 2012
1 parent 0fda734 commit 24558f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 34 deletions.
29 changes: 1 addition & 28 deletions Readme.md
Expand Up @@ -18,12 +18,6 @@

```
Hello {{name}}! {{^authenticated}}<a href="/login">login</a>{{/authenticated}}
```

or the following is valid:

```
Hello {name}! {^authenticated}<a href="/login">login</a>{/authenticated}
```

convert it:
Expand Down Expand Up @@ -75,25 +69,4 @@ module.exports = function anonymous(obj) {

## License

(The MIT License)

Copyright (c) 2012 TJ Holowaychuk &lt;tj@vision-media.ca&gt;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT
2 changes: 1 addition & 1 deletion component.json
@@ -1,6 +1,6 @@
{
"name": "minstache",
"version": "0.0.1",
"version": "1.0.0",
"description": "Mini mustache template engine",
"keywords": ["mustache", "template", "engine"],
"scripts": ["index.js"]
Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -94,7 +94,7 @@ function assertProperty(prop) {
*/

function parse(str) {
return str.split(/\{\{?|\}?\}/);
return str.split(/\{\{|\}\}/);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "minstache",
"version": "0.0.1",
"version": "1.0.0",
"description": "Mini mustache template engine",
"keywords": ["mustache", "template", "engine"],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Expand Up @@ -6,9 +6,9 @@
var mm = require('..');

describe('{id}', function(){
it('should work too', function(){
it('should not work', function(){
var user = { name: 'tobi' };
mm('hi {name}.', user).should.equal('hi tobi.');
mm('hi {name}.', user).should.equal('hi {name}.');
})
})

Expand Down Expand Up @@ -80,7 +80,7 @@ describe('{{#id}}', function(){
}
};

mm('{#md}some _markdown_ awesome!{/md}', obj)
mm('{{#md}}some _markdown_ awesome!{{/md}}', obj)
.should.equal('some <em>markdown</em> awesome!');
})
})
Expand Down

0 comments on commit 24558f4

Please sign in to comment.