Comparing version 1.2.1 to 1.2.2
@@ -139,3 +139,3 @@ var through = require('through'); | ||
self._writing = false; | ||
self._matcher = matcher(parseSelector(sel)); | ||
self._matcher = matcher(parseSelector(sel), self); | ||
@@ -142,0 +142,0 @@ var remainingSets = []; |
@@ -16,3 +16,3 @@ var inherits = require('inherits'); | ||
module.exports = function (selector) { | ||
module.exports = function (selector, result) { | ||
var group = new EventEmitter; | ||
@@ -29,3 +29,3 @@ var matchers = group.matchers = [ create() ]; | ||
function create () { | ||
var m = new Match(selector); | ||
var m = new Match(selector, result); | ||
@@ -55,3 +55,3 @@ m.on('open', group.emit.bind(group, 'open')); | ||
function Match (selector) { | ||
function Match (selector, result) { | ||
this.selector = selector; | ||
@@ -64,2 +64,3 @@ this.index = 0; | ||
this.operator = null; | ||
this.result = result; | ||
} | ||
@@ -125,4 +126,7 @@ | ||
} | ||
else if (this.stack.length <= this.startLevel) { | ||
this.unmatch(); | ||
else if (this.index <= this.startLevel && this.startLevel !== null) { | ||
if (!this.result._reading && !this.result._writing) { | ||
this.stack.pop(); | ||
if (this.stack.length && this.index > 0) this.index --; | ||
} | ||
} | ||
@@ -129,0 +133,0 @@ } |
{ | ||
"name" : "trumpet", | ||
"version" : "1.2.1", | ||
"version" : "1.2.2", | ||
"description" : "parse and transform streaming html using css selectors", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42715
47
1056
19