Skip to content

Commit 01e548b

Browse files
committed
Better html detection
1 parent 79afb71 commit 01e548b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

demo_frame.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ module.exports = function(node){
8080
var scripts = [].slice.call(this.contentDocument.querySelectorAll("script"));
8181
// get the first one that is JS
8282
for(var i =0; i < scripts.length; i++){
83-
if(!scripts[i].type || scripts[i].type.indexOf("javascript") >= 0 &&
84-
!scripts[i].src){
83+
if(!scripts[i].type || (scripts[i].type.indexOf("javascript") === 0 &&
84+
!scripts[i].src)){
8585
source = scripts[i].innerHTML;
8686
break;
8787
}

tags.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

22
exports.demo = {
33
add: function( line, curData, scope, objects, currentWrite ) {
4-
console.log("DOING IT");
5-
64
var m = line.match(/^\s*@demo\s*([\w\.\/\-\$]*)\s*([\w]*)/)
75
if ( m ) {
86
var src = m[1] ? m[1].toLowerCase() : '';

0 commit comments

Comments
 (0)