rdfa-streaming-parser
Advanced tools
Comparing version 1.0.0 to 1.1.0
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
<a name="v1.1.0"></a> | ||
## [v1.1.0](https://github.com/rubensworks/streaming-rdfa-parser.js/compare/v1.0.0...v1.1.0) - 2019-07-16 | ||
### Fixed | ||
* [Fix inner HTML parser not being ended properly](https://github.com/rubensworks/streaming-rdfa-parser.js/commit/f9c3b443d46f15d327c3661507e28b91b9d16abf) | ||
<a name="v1.0.0"></a> | ||
@@ -5,0 +11,0 @@ ## [v1.0.0] - 2019-07-08 |
@@ -24,2 +24,6 @@ /** | ||
onText(data: string): void; | ||
/** | ||
* Called when parsing has ended. | ||
*/ | ||
onEnd(): void; | ||
} |
@@ -31,2 +31,3 @@ /// <reference types="node" /> | ||
_transform(chunk: any, encoding: string, callback: TransformCallback): void; | ||
_flush(callback: TransformCallback): void; | ||
onTagOpen(name: string, attributes: { | ||
@@ -37,3 +38,3 @@ [s: string]: string; | ||
onTagClose(): void; | ||
protected onEnd(): void; | ||
onEnd(): void; | ||
/** | ||
@@ -40,0 +41,0 @@ * If the new subject can be inherited from the parent object |
@@ -56,2 +56,6 @@ "use strict"; | ||
} | ||
_flush(callback) { | ||
this.parser.end(); | ||
callback(); | ||
} | ||
onTagOpen(name, attributes) { | ||
@@ -540,6 +544,2 @@ // Determine the parent tag (ignore skipped tags) | ||
this.activeTagStack.pop(); | ||
// Call end method if our last tag has been popped | ||
if (this.activeTagStack.length === 1) { | ||
this.onEnd(); | ||
} | ||
return; | ||
@@ -610,6 +610,2 @@ } | ||
} | ||
// Call end method if our last tag has been popped | ||
if (this.activeTagStack.length === 1) { | ||
this.onEnd(); | ||
} | ||
} | ||
@@ -757,2 +753,13 @@ onEnd() { | ||
}, | ||
onend: () => { | ||
try { | ||
this.onEnd(); | ||
} | ||
catch (e) { | ||
this.emit('error', e); | ||
} | ||
if (this.htmlParseListener) { | ||
this.htmlParseListener.onEnd(); | ||
} | ||
}, | ||
onopentag: (name, attributes) => { | ||
@@ -759,0 +766,0 @@ try { |
{ | ||
"name": "rdfa-streaming-parser", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A fast and lightweight streaming RDFa parser", | ||
@@ -92,3 +92,2 @@ "keywords": [ | ||
"version": "manual-git-changelog onversion", | ||
"spec": "npm run spec-html4 && npm run spec-html5 && npm run spec-xhtml5 && npm run spec-svg && npm run spec-xhtml1 && npm run spec-xml", | ||
@@ -98,3 +97,2 @@ "spec-earl": "npm run spec-html4-earl && npm run spec-html5-earl && npm run spec-xhtml5-earl && npm run spec-svg-earl && npm run spec-xhtml1-earl && npm run spec-xml-earl", | ||
"spec-role-earl": "npm run spec-role-html5-earl && npm run spec-role-xhtml5-earl && npm run spec-role-xhtml1-earl && npm run spec-role-xml-earl", | ||
"spec-html4": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1/html4/manifest.ttl -i '{ \"profile\": \"html\" }' -c .rdf-test-suite-cache/", | ||
@@ -112,3 +110,2 @@ "spec-html4-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1/html4/manifest.ttl -i '{ \"profile\": \"html\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-rdfastreamingparser-html4.ttl", | ||
"spec-xml-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1/xml/manifest.ttl -i '{ \"profile\": \"xml\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-rdfastreamingparser-xml.ttl", | ||
"spec-role-html5": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1-role/html5/manifest.ttl -i '{ \"profile\": \"html\" }' -c .rdf-test-suite-cache/", | ||
@@ -124,3 +121,2 @@ "spec-role-html5-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1-role/html5/manifest.ttl -i '{ \"profile\": \"html\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-rdfastreamingparser-role-html5.ttl", | ||
"spec-role-xml-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.1-role/xml/manifest.ttl -i '{ \"profile\": \"xml\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-rdfastreamingparser-role-xml.ttl", | ||
"spec-1-svg": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.0/svg/manifest.ttl -i '{ \"profile\": \"xml\" }' -c .rdf-test-suite-cache/", | ||
@@ -127,0 +123,0 @@ "spec-1-svg-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.0/svg/manifest.ttl -i '{ \"profile\": \"xml\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-rdfastreamingparser-1-svg.ttl", |
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
90660
1620