posthtml-parser
Advanced tools
Comparing version 0.3.1 to 0.3.2
'use strict'; | ||
var htmlparser = require('htmlparser2'); | ||
var Parser = require('htmlparser2/lib/Parser'); | ||
var isObject = require('isobject'); | ||
@@ -29,3 +29,3 @@ var objectAssign = require('object-assign'); | ||
function parserDirective(name, data) { | ||
var directives = options.directives || defaultDirectives; | ||
var directives = objectAssign(defaultDirectives, options.directives); | ||
var last = bufArray.last(); | ||
@@ -60,3 +60,3 @@ | ||
var parser = new htmlparser.Parser({ | ||
var parser = new Parser({ | ||
onprocessinginstruction: parserDirective, | ||
@@ -121,3 +121,3 @@ oncomment: function(data) { | ||
function parser(html) { | ||
var opt = option || defaultOptions; | ||
var opt = objectAssign(defaultOptions, option); | ||
return postHTMLParser(html, opt); | ||
@@ -124,0 +124,0 @@ } |
{ | ||
"name": "posthtml-parser", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Parse HTML/XML to PostHTMLTree", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25881
0