Skip to content

Commit

Permalink
Fix SAX fragment parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
danyaPostfactum committed Aug 9, 2014
1 parent f16991a commit 4ff67be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/sax/SAXTreeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ SAXTreeBuilder.prototype.detachFromParent = function(element) {
};

SAXTreeBuilder.prototype.reparentChildren = function(oldParent, newParent) {
newParent.appendChildren(oldParent.firstChild);
newParent.appendChildren(oldParent);
};

SAXTreeBuilder.prototype.getFragment = function() {
Expand All @@ -101,6 +101,11 @@ SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes)
}
};

function Locator() {
this.lineNumber = -1;
this.columnNumber = -1;
}

var NodeType = {
/**
* A CDATA section.
Expand Down

2 comments on commit 4ff67be

@aredridel
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Released as v1.0.3

@danyaPostfactum
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aredridel ! You are ... too fast :)

Please sign in to comment.