Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hyojin authored and ncoquelet committed Aug 4, 2015
1 parent 98ee306 commit 85708ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nodeparser.js
Expand Up @@ -185,7 +185,7 @@ NodeParser.prototype.getPseudoElement = function(container, type) {

NodeParser.prototype.getChildren = function(parentContainer) {
return flatten([].filter.call(parentContainer.node.childNodes, renderableNode).map(function(node) {
var container = [node.nodeType === Node.TEXT_NODE ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
var container = [node.nodeType === Node.TEXT_NODE && node.parentElement.tagName !== "text" ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
return node.nodeType === Node.ELEMENT_NODE && container.length && node.tagName !== "TEXTAREA" ? (container[0].isElementVisible() ? container.concat(this.getChildren(container[0])) : []) : container;
}, this));
};
Expand Down

0 comments on commit 85708ea

Please sign in to comment.