Skip to content

Commit 4de93bb

Browse files
authored
Merge pull request #28 from posthtml/milestone-0.3.2
Milestone 0.3.2
2 parents 29944dc + 21d117d commit 4de93bb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function postHTMLParser(html, options) {
2626
};
2727

2828
function parserDirective(name, data) {
29-
var directives = options.directives || defaultDirectives;
29+
var directives = objectAssign(defaultDirectives, options.directives);
3030
var last = bufArray.last();
3131

3232
for (var i = 0; i < directives.length; i++) {
@@ -116,7 +116,7 @@ function parserWrapper() {
116116
var option;
117117

118118
function parser(html) {
119-
var opt = option || defaultOptions;
119+
var opt = objectAssign(defaultOptions, option);
120120
return postHTMLParser(html, opt);
121121
}
122122

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "posthtml-parser",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Parse HTML/XML to PostHTMLTree",
55
"keywords": [
66
"html",

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('PostHTML-Parser test', function() {
3434

3535
it('should use default options when called with 1 param', function() {
3636
parserWithMockedDeps('');
37-
expect(parserSpy.firstCall.args[1]).to.eql(parser.defaultOptions);
37+
expect(parserSpy.firstCall.args[1]).to.eql(customOptions);
3838
});
3939

4040
it('should use custom options when called with 2 params', function() {

0 commit comments

Comments
 (0)