We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29944dc commit 8eaa928Copy full SHA for 8eaa928
1 file changed
index.js
@@ -26,7 +26,7 @@ function postHTMLParser(html, options) {
26
};
27
28
function parserDirective(name, data) {
29
- var directives = options.directives || defaultDirectives;
+ var directives = objectAssign(defaultDirectives, options.directives);
30
var last = bufArray.last();
31
32
for (var i = 0; i < directives.length; i++) {
@@ -113,10 +113,10 @@ function postHTMLParser(html, options) {
113
}
114
115
function parserWrapper() {
116
- var option;
+ var option = {};
117
118
function parser(html) {
119
- var opt = option || defaultOptions;
+ var opt = objectAssign(defaultOptions, option);
120
return postHTMLParser(html, opt);
121
122
0 commit comments