Skip to content

Commit 31b2472

Browse files
committed
fix readme
1 parent 207033d commit 31b2472

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,35 @@ SYNOPSIS
2222
```ejs
2323
<!DOCTYPE html>
2424
<html>
25-
<head>
26-
<title></title>
27-
<meta charset="utf-8"/>
28-
</head>
29-
<body>
30-
<script type="application/x-template" id="tmpl1">
31-
<div class='foobar' id="aaa">
32-
<% if (isFoo) { %>
33-
<%= foobar %>
34-
<% } else { %>
35-
<%= foobaz %>
36-
<% } %>
37-
38-
<%=raw html %>
39-
</div>
40-
</script>
41-
<script type="module">
42-
import { extended as template } from 'https://cdn.jsdelivr.net/npm/micro-template@2.1.2/lib/micro-template.js';
43-
console.log('micro-template.js loaded', template);
44-
console.log('Template example:', template('tmpl1', { isFoo: true, foobar: "a", foobaz: "b" }));
45-
var html = template('tmpl1', {
46-
isFoo : true,
47-
foobar : 'foobar!!',
48-
foobaz : 'foobaz!!',
49-
html : '<marquee>Helloooo</marquee>'
50-
});
51-
console.log(html);
52-
</script>
53-
</body>
25+
<head>
26+
<meta charset="utf-8"/>
27+
<title>micro-template.js test</title>
28+
</head>
29+
<body>
30+
<script type="application/x-template" id="tmpl1">
31+
<div class='foobar' id="aaa">
32+
<% if (isFoo) { %>
33+
<%= foobar %>
34+
<% } else { %>
35+
<%= foobaz %>
36+
<% } %>
37+
38+
<%=raw html %>
39+
</div>
40+
</script>
41+
<script type="module">
42+
import { extended as template } from 'https://cdn.jsdelivr.net/npm/micro-template@2.1.2/lib/micro-template.js';
43+
console.log('micro-template.js loaded', template);
44+
console.log('Template example:', template('tmpl1', { isFoo: true, foobar: "a", foobaz: "b" }));
45+
let html = template('tmpl1', {
46+
isFoo : true,
47+
foobar : 'foobar!!',
48+
foobaz : 'foobaz!!',
49+
html : '<marquee>Helloooo</marquee>'
50+
});
51+
console.log(html);
52+
</script>
53+
</body>
5454
</html>
5555
```
5656

0 commit comments

Comments
 (0)