Skip to content

Commit e3bf8b4

Browse files
committed
Only group siblings if has nav
1 parent 5221c5b commit e3bf8b4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

example.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,13 @@
3939
// filename.js (Bitbucket) - two
4040
console.log("yay bitbucket!")
4141
</code></pre>
42+
43+
<pre><code>
44+
console.log("yay one!")
45+
</code></pre>
46+
47+
<pre><code>
48+
console.log("yay two!")
49+
</code></pre>
4250
</body>
4351
</html>

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ class Codeplus {
290290
group.push(instances[i]);
291291
} else {
292292
if (
293+
instances[i].hasNav() &&
293294
instances[i].containerNode.previousElementSibling ===
294-
group[group.length - 1].containerNode
295+
group[group.length - 1].containerNode
295296
) {
296297
group.push(instances[i]);
297298
} else {

0 commit comments

Comments
 (0)