From 2cb9497d02afdcfc19ea52fddcd6d1f04d81ffdb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 12 Oct 2010 21:52:04 -0700 Subject: Fixed issue where compiler would pass in detached text node if previous markup would have removed it. --- src/Compiler.js | 26 +++++++++++--------------- src/markups.js | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/Compiler.js b/src/Compiler.js index a78a04c9..9263dc02 100644 --- a/src/Compiler.js +++ b/src/Compiler.js @@ -158,12 +158,17 @@ Compiler.prototype = { } if (descend){ // process markup for text nodes only - eachTextNode(element, function(textNode){ - var text = textNode.text(); - foreach(self.markup, function(markup){ - markup.call(selfApi, text, textNode, element); - }); - }); + for(var i=0, child=element[0].childNodes; + i