Skip to content

Commit 96c33a5

Browse files
committed
Minor README update.
1 parent 9b0f41f commit 96c33a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ var result = tmpl("<h3>{%=p.title%}</h3>", {title: "JavaScript Templates"});
222222
### Template parsing
223223
The template contents are matched and replaced using the regular expression **tmpl.regexp** and the replacement function **tmpl.func**. The replacement function operates based on the [parenthesized submatch strings](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter).
224224

225-
To use different tags for the template syntax, override **tmpl.regexp** with a modified regular expression, by exchanging all occurrences of "**\\{%**" and "**%\\}**", e.g. with "**\\[%**" and "**%\\]**":
225+
To use different tags for the template syntax, override **tmpl.regexp** with a modified regular expression, by exchanging all occurrences of "{%" and "%}", e.g. with "[%" and "%]":
226226

227227
```js
228228
tmpl.regexp = /([\s'\\])(?![^%]*%\])|(?:\[%(=|#)([\s\S]+?)%\])|(\[%)|(%\])/g;
@@ -300,7 +300,7 @@ Use **include(str, obj)** to include content from a different template:
300300
</div>
301301
```
302302

303-
If else condition:
303+
**If else condition**:
304304

305305
```html
306306
{% if (o.author.url) { %}
@@ -310,7 +310,7 @@ If else condition:
310310
{% } %}
311311
```
312312

313-
For loop:
313+
**For loop**:
314314

315315
```html
316316
<ul>

0 commit comments

Comments
 (0)