Let me do some research on that. I'm not sure we have a good way of uniquely identifying dom nodes via SPL, and recursively parsing will make ordering uncertain.

On Jan 4, 2013, at 5:12 PM, Kyle Florence <notifications@github.com> wrote:

> In extensions/wikia/RTE/RTEReverseParser.class.php:
> 
> > @@ -2069,4 +2084,26 @@ public static function isJqueryAttribute($attrName){
> >  
> >  		return false;
> >  	}
> > +	
> > +	/**
> > +	 * Determines if a tag was either html or a parser tag hook
> > +	 * @param DomNode $node
> > +	 * @return bool
> > +	 */
> > +	private function wasTag( $node ) {
> > +		global $wgParser;
> > +		$wgParser->firstCallInit();
> > +		if ( self::wasHtml( $node ) ) {
> > +			return true;
> > +		}
> > +		for ( $i = 0; $i < count( $this->nodes ); $i++ ) {
> Are you sure you can't get the name of the tag without looping through all previous nodes?
> 
> —
> Reply to this email directly or view it on GitHub.
>