Skip to content

Commit

Permalink
Update HtmlDiff.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rashid2538 committed Jan 14, 2014
1 parent e9b4836 commit d197aea
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions HtmlDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ private function InsertTag( $tag, $cssClass, &$words ) {
$this->content .= $specialCaseTagInjection . implode( "", $this->ExtractConsecutiveWords( $words, 'tag' ) );
} else {
$workTag = $this->ExtractConsecutiveWords( $words, 'tag' );
if( $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
if( strpos( $workTag[ 0 ], 'class=' ) ) {
$workTag[ 0 ] = str_replace( 'class="', 'class="diffmod ', $workTag[ 0 ] );
$workTag[ 0 ] = str_replace( "class='", 'class="diffmod ', $workTag[ 0 ] );
} else {
$workTag[ 0 ] = str_replace( ">", ' class="diffmod">', $workTag[ 0 ] );
}
}
$this->content .= implode( "", $workTag ) . $specialCaseTagInjection;
if( $this->IsOpeningTag( $workTag[ 0 ] ) && !$this->IsClosingTag( $workTag[ 0 ] ) ) {
if( strpos( $workTag[ 0 ], 'class=' ) ) {
$workTag[ 0 ] = str_replace( 'class="', 'class="diffmod ', $workTag[ 0 ] );
$workTag[ 0 ] = str_replace( "class='", 'class="diffmod ', $workTag[ 0 ] );
} else {
$workTag[ 0 ] = str_replace( ">", ' class="diffmod">', $workTag[ 0 ] );
}
}
$this->content .= implode( "", $workTag ) . $specialCaseTagInjection;
}
}
}
Expand Down

0 comments on commit d197aea

Please sign in to comment.