RemexHtml/TreeBuilder/InTableText.php
protected function processPendingCharacters() {
		$builder = $this->builder;
		$allSpace = true;
		foreach ( $builder->pendingTableCharacters as $token ) {
			list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
			if ( strspn( $text, "\t\n\f\r ", $start, $length ) !== $length ) {
				$allSpace = false;
			}
		}
		if ( $allSpace ) {
			foreach ( $builder->pendingTableCharacters as $token ) {
				list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
				$builder->insertCharacters( $text, $start, $length, $sourceStart, $sourceLength );
			}
		} else {
			$builder->fosterParenting = true;
			foreach ( $builder->pendingTableCharacters as $token ) {
				list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
				$builder->error( 'invalid characters in table text, fostering', $sourceStart );
				$this->dispatcher->inBody->characters( $text, $start, $length,
					$sourceStart, $sourceLength );
			}
			$builder->fosterParenting = false;
		}
	}
protected function processPendingCharacters() {
		$builder = $this->builder;
		$allSpace = true;
		foreach ( $builder->pendingTableCharacters as $token ) {
			list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
			if ( strspn( $text, "\t\n\f\r ", $start, $length ) !== $length ) {
				$allSpace = false;
			}
		}
		if ( $allSpace ) {
			foreach ( $builder->pendingTableCharacters as $token ) {
				list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
				$builder->insertCharacters( $text, $start, $length, $sourceStart, $sourceLength );
			}
		} else {
			$builder->fosterParenting = true;
			foreach ( $builder->pendingTableCharacters as $token ) {
				list( $text, $start, $length, $sourceStart, $sourceLength ) = $token;
				$builder->error( 'invalid characters in table text, fostering', $sourceStart );
				$this->dispatcher->inBody->characters( $text, $start, $length,
					$sourceStart, $sourceLength );
			}
			$builder->fosterParenting = false;
		}
	}
protected function processPendingCharacters ( ) { $ builder = $ this -> builder ; $ allSpace = true ; foreach ( $ builder -> pendingTableCharacters as $ token ) { list ( $ text , $ start , $ length , $ sourceStart , $ sourceLength ) = $ token ; if ( strspn ( $ text , "\t\n\f\r " , $ start , $ length ) !== $ length ) { $ allSpace = false ; } } if ( $ allSpace ) { foreach ( $ builder -> pendingTableCharacters as $ token ) { list ( $ text , $ start , $ length , $ sourceStart , $ sourceLength ) = $ token ; $ builder -> insertCharacters ( $ text , $ start , $ length , $ sourceStart , $ sourceLength ) ; } } else { $ builder -> fosterParenting = true ; foreach ( $ builder -> pendingTableCharacters as $ token ) { list ( $ text , $ start , $ length , $ sourceStart , $ sourceLength ) = $ token ; $ builder -> error ( 'invalid characters in table text, fostering' , $ sourceStart ) ; $ this -> dispatcher -> inBody -> characters ( $ text , $ start , $ length , $ sourceStart , $ sourceLength ) ; } $ builder -> fosterParenting = false ; } }
Common code for the "anything else" case. Process the pending table
character tokens.
Common code for the anything else case . Process the pending table character tokens .