Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #617: Reintroduce pull requests #643 and #664 #671

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions README.md
Expand Up @@ -504,17 +504,12 @@ Custom delimiters can be used in place of `{{` and `}}` by setting the new value

#### Setting in JavaScript

The `Mustache.tags` property holds an array consisting of the opening and closing tag values. Set custom values by passing a new array of tags to `parse()`, which gets honored over the default values, or by overriding the `tags` property itself:
The `Mustache.tags` property holds an array consisting of the opening and closing tag values. Set custom values by setting this property.

```js
var customTags = [ '<%', '%>' ];
```

##### Pass Value into Parse Method
```js
Mustache.parse(template, customTags);
```

##### Override Tags Property
```js
Mustache.tags = customTags;
Expand Down
3 changes: 2 additions & 1 deletion mustache.js
Expand Up @@ -439,7 +439,8 @@
};

/**
* Parses and caches the given `template` and returns the array of tokens
* Parses and caches the given `template` according to the given `tags` or
* `mustache.tags` if `tags` is omitted, and returns the array of tokens
* that is generated from the parse.
*/
Writer.prototype.parse = function parse (template, tags) {
Expand Down