I like that idea because it subdivides the problem space.

On Jan 4, 2013, at 5:26 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++ ) {
> Since parsing only goes in one direction, we can probably just store tag names as we find them and keep a counter variable that can be used to grab the previous one easily.
> 
> —
> Reply to this email directly or view it on GitHub.
>