Comparing version 1.2.3 to 1.3.0
25
index.js
@@ -15,2 +15,3 @@ var through = require('through'); | ||
var skipping = false; | ||
var skipSpace = false; | ||
var lastToken = null; | ||
@@ -43,2 +44,3 @@ | ||
r._setAttr = {}; | ||
r._rmAttr = {}; | ||
}); | ||
@@ -120,5 +122,15 @@ }; | ||
if (skipSpace) { | ||
skipSpace = false; | ||
if (lex[0] === 'tag-space') return; | ||
} | ||
if (skipping) return; | ||
if (sub !== undefined) tr.queue(sub) | ||
else tr.queue(lex[1]) | ||
if (sub === undefined) { | ||
tr.queue(lex[1]); | ||
} | ||
else if (sub === null) { | ||
skipSpace = true; | ||
} | ||
else tr.queue(sub); | ||
} | ||
@@ -136,2 +148,3 @@ | ||
self._setAttr = {}; | ||
self._rmAttr = {}; | ||
self._getAttr = {}; | ||
@@ -183,2 +196,5 @@ self._readStreams = []; | ||
} | ||
if (self._rmAttr[node.name]) { | ||
self._substitute = null; | ||
} | ||
}); | ||
@@ -229,2 +245,7 @@ } | ||
Result.prototype.removeAttribute = function (key) { | ||
this._rmAttr[key.toUpperCase()] = true; | ||
return this; | ||
}; | ||
Result.prototype.getAttribute = function (key, cb) { | ||
@@ -231,0 +252,0 @@ this._getAttr[key.toUpperCase()] = cb; |
{ | ||
"name" : "trumpet", | ||
"version" : "1.2.3", | ||
"version" : "1.3.0", | ||
"description" : "parse and transform streaming html using css selectors", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
Sorry, the diff of this file is not supported yet
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
44147
49
1095
161
20