Skip to content

Commit a3fcb64

Browse files
committed
changing to a div
1 parent 143885e commit a3fcb64

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function findPreviousSibling(start, tag) {
105105
}
106106

107107
module.exports = function() {
108-
var highlights = document.querySelectorAll('span[line-highlight]')
108+
var highlights = document.querySelectorAll('div[line-highlight]');
109109

110110
for (var i = 0; i < highlights.length; i++) {
111111
var highlight = highlights[i];

tags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports.highlight = {
3838
add: function(line, curData) {
3939
var space = line.substr(0, line.indexOf("@highlight"));
4040
var lines = line.replace("@highlight","").trim();
41-
var html = space+"<span line-highlight='"+lines+"'></span>";
41+
var html = space+"<div line-highlight='"+lines+"'></div>";
4242
var validCurData = (curData && curData.length !== 2);
4343
var useCurData = validCurData && (typeof curData.description === "string") && !curData.body;
4444

test-demo.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Put the markup in a template. Change the `HTML` tab to the following:
101101

102102
</html>
103103
```
104-
<span line-highlight='11,68,only'/>
104+
<div line-highlight='11,68,only'/>
105105

106106
> NOTE: autofocus
107107
@@ -112,7 +112,7 @@ var template = can.stache.from("todomvc-template");
112112
var frag = template({});
113113
document.body.appendChild(frag);
114114
```
115-
<span line-highlight='1-3,only'/>
115+
<div line-highlight='1-3,only'/>
116116

117117
## Create the todos type and get items left working
118118

@@ -149,7 +149,7 @@ var template = can.stache.from("todomvc-template");
149149
var frag = template({todos: todos});
150150
document.body.appendChild(frag);
151151
```
152-
<span line-highlight='1-25,28,only'/>
152+
<div line-highlight='1-25,28,only'/>
153153

154154
Update `HTML` to:
155155

@@ -215,7 +215,7 @@ Update `HTML` to:
215215

216216
</html>
217217
```
218-
<span line-highlight='22-31,36,50,only'/>
218+
<div line-highlight='22-31,36,50,only'/>
219219

220220
Note:
221221

@@ -276,7 +276,7 @@ var template = can.stache.from("todomvc-template");
276276
var frag = template({todosPromise: Todo.getList({})});
277277
document.body.appendChild(frag);
278278
```
279-
<span line-highlight='1-15,37-43,46,only'/>
279+
<div line-highlight='1-15,37-43,46,only'/>
280280

281281
Update `HTML` to:
282282

@@ -342,7 +342,7 @@ Update `HTML` to:
342342

343343
</html>
344344
```
345-
<span line-highlight='22,36,50,only'/>
345+
<div line-highlight='22,36,50,only'/>
346346

347347
Note:
348348

@@ -415,7 +415,7 @@ Update `HTML` to:
415415
416416
</html>
417417
```
418-
<span line-highlight='23-24,28,only'/>
418+
<div line-highlight='23-24,28,only'/>
419419

420420
TODO:
421421

@@ -490,7 +490,7 @@ var template = can.stache.from("todomvc-template");
490490
var frag = template({todosPromise: Todo.getList({})});
491491
document.body.appendChild(frag);
492492
```
493-
<span line-highlight='46-59,only'/>
493+
<div line-highlight='46-59,only'/>
494494

495495
Update `HTML` to:
496496

@@ -563,7 +563,7 @@ Update `HTML` to:
563563

564564
</html>
565565
```
566-
<span line-highlight='11-16,18,22,only'/>
566+
<div line-highlight='11-16,18,22,only'/>
567567

568568
## List todos
569569

@@ -643,7 +643,7 @@ var template = can.stache.from("todomvc-template");
643643
var frag = template({todosPromise: Todo.getList({})});
644644
document.body.appendChild(frag);
645645
```
646-
<span line-highlight='60-68,only'/>
646+
<div line-highlight='60-68,only'/>
647647

648648
Update `HTML` to:
649649

@@ -720,7 +720,7 @@ Update `HTML` to:
720720

721721
</html>
722722
```
723-
<span line-highlight='18-32,43,only'/>
723+
<div line-highlight='18-32,43,only'/>
724724

725725

726726
## Edit todos
@@ -818,7 +818,7 @@ var template = can.stache.from("todomvc-template");
818818
var frag = template({todosPromise: Todo.getList({})});
819819
document.body.appendChild(frag);
820820
```
821-
<span line-highlight='62-78,only'/>
821+
<div line-highlight='62-78,only'/>
822822

823823

824824

@@ -902,7 +902,7 @@ Update `HTML` to:
902902
903903
</html>
904904
```
905-
<span line-highlight='23,26,29-32,only'/>
905+
<div line-highlight='23,26,29-32,only'/>
906906

907907
## Routing
908908

@@ -1020,7 +1020,7 @@ can.route.ready();
10201020
var frag = template(vm);
10211021
document.body.appendChild(frag);
10221022
```
1023-
<span line-highlight='87-109,only'/>
1023+
<div line-highlight='87-109,only'/>
10241024

10251025
Update `HTML` to:
10261026

@@ -1104,7 +1104,7 @@ Update `HTML` to:
11041104
11051105
</html>
11061106
```
1107-
<span line-highlight='55-56,59-60,63-64,only'/>
1107+
<div line-highlight='55-56,59-60,63-64,only'/>
11081108
11091109
11101110
## Check all and clear completed
@@ -1259,7 +1259,7 @@ can.route.ready();
12591259
var frag = template(vm);
12601260
document.body.appendChild(frag);
12611261
```
1262-
<span line-highlight='40-57,128-135,only'/>
1262+
<div line-highlight='40-57,128-135,only'/>
12631263
12641264
Update `HTML` to:
12651265
@@ -1346,4 +1346,4 @@ Update `HTML` to:
13461346
13471347
</html>
13481348
```
1349-
<span line-highlight='45-47,69-70,only'/>
1349+
<div line-highlight='45-47,69-70,only'/>

0 commit comments

Comments
 (0)